Skip to content

Commit b13239c

Browse files
committed
optimize builder args generate
1 parent 77c9d60 commit b13239c

1 file changed

Lines changed: 11 additions & 7 deletions

File tree

src/CodeBuilder.ts

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -507,20 +507,16 @@ export abstract class CodeBuilder {
507507
}
508508
}
509509

510-
if (config.toolchain === 'Keil_C51') { // disable increment compile for Keil C51
511-
builderModeList.push('normal');
510+
if (config.toolchain === 'Keil_C51') {
511+
builderModeList.push('normal'); // disable increment build for Keil C51
512512
} else {
513-
builderModeList.push(this.isRebuild() ? 'normal' : 'fast');
513+
builderModeList.push('fast');
514514
}
515515

516516
if (settingManager.isUseMultithreadMode()) {
517517
builderModeList.push('multhread');
518518
}
519519

520-
if (this.useShowParamsMode) {
521-
builderModeList.push('debug');
522-
}
523-
524520
// set build mode
525521
builderOptions.buildMode = builderModeList.map(str => str.toLowerCase()).join('|');
526522
}
@@ -542,6 +538,14 @@ export abstract class CodeBuilder {
542538
'-p', paramsPath,
543539
];
544540

541+
if (this.isRebuild()) {
542+
cmds.push('--rebuild');
543+
}
544+
545+
if (this.useShowParamsMode) {
546+
cmds.push('--only-dump-args');
547+
}
548+
545549
const extraCmd = settingManager.getBuilderAdditionalCommandLine()?.trim();
546550
if (extraCmd) {
547551
cmds = cmds.concat(extraCmd.split(/\s+/));

0 commit comments

Comments
 (0)