diff --git a/etc/config/compiler-explorer.amazon.properties b/etc/config/compiler-explorer.amazon.properties index 1fee2b02d33..1d36b82222a 100644 --- a/etc/config/compiler-explorer.amazon.properties +++ b/etc/config/compiler-explorer.amazon.properties @@ -37,7 +37,7 @@ alwaysResetLdPath=true plogConverter=/opt/compiler-explorer/pvs-studio-latest/bin/plog-converter cmake=/opt/compiler-explorer/cmake/bin/cmake -make=/usr/bin/make +useninja=false ld=/usr/bin/ld readelf=/usr/bin/readelf diff --git a/etc/config/compiler-explorer.defaults.properties b/etc/config/compiler-explorer.defaults.properties index abccd070f6d..7099726b9a3 100644 --- a/etc/config/compiler-explorer.defaults.properties +++ b/etc/config/compiler-explorer.defaults.properties @@ -45,7 +45,7 @@ remoteStorageServer=https://godbolt.org compilationEnvTimeoutMs=300000 cmake=cmake -make=make +useninja=false ld=ld readelf=readelf diff --git a/lib/base-compiler.ts b/lib/base-compiler.ts index ac7c53d320c..b04f946a6e8 100644 --- a/lib/base-compiler.ts +++ b/lib/base-compiler.ts @@ -2034,7 +2034,14 @@ export class BaseCompiler implements ICompiler { const toolchainparam = this.getCMakeExtToolchainParam(); const cmakeArgs = utils.splitArguments(key.backendOptions.cmakeArgs); - const fullArgs = [toolchainparam, ...this.getExtraCMakeArgs(key), ...cmakeArgs, '..']; + const partArgs: string[] = [toolchainparam, ...this.getExtraCMakeArgs(key), ...cmakeArgs, '..']; + let fullArgs: string[] = []; + const useNinja = this.env.ceProps('useninja'); + if (useNinja) { + fullArgs = ['-GNinja'].concat(partArgs); + } else { + fullArgs = partArgs; + } const cmakeStepResult = await this.doBuildstepAndAddToResult( fullResult, @@ -2056,9 +2063,9 @@ export class BaseCompiler implements ICompiler { const makeStepResult = await this.doBuildstepAndAddToResult( fullResult, - 'make', - this.env.ceProps('make'), - [], + 'build', + this.env.ceProps('cmake'), + ['--build', '.'], execParams, ); diff --git a/lib/compilers/cc65.ts b/lib/compilers/cc65.ts index 8eb286a608a..fa4e2bcb3a0 100644 --- a/lib/compilers/cc65.ts +++ b/lib/compilers/cc65.ts @@ -126,7 +126,7 @@ export class Cc65Compiler extends BaseCompiler { override async doBuildstepAndAddToResult(result: CompilationResult, name, command, args, execParams) { const stepResult = await super.doBuildstepAndAddToResult(result, name, command, args, execParams); - if (name === 'make') { + if (name === 'build') { const mapFile = path.join(execParams.customCwd, 'map.txt'); if (await utils.fileExists(mapFile)) { const file_buffer = await fs.readFile(mapFile);