diff --git a/etc/config/c++.defaults.properties b/etc/config/c++.defaults.properties index 3f7caf89e..cb85f017a 100644 --- a/etc/config/c++.defaults.properties +++ b/etc/config/c++.defaults.properties @@ -1,56 +1,37 @@ # Default settings for C++ compilers=&gcc:&clang -group.gcc.compilers=g44:g45:g46:g47:g48:g5:g6x:g7:g8:g9:g10:g11:gdefault +group.gcc.compilers=g10:g11:g12:gdefault group.gcc.compilerCategories=gcc -compiler.g44.exe=/usr/bin/g++-4.4 -compiler.g44.name=g++ 4.4 -compiler.g45.exe=/usr/bin/g++-4.5 -compiler.g45.name=g++ 4.5 -compiler.g46.exe=/usr/bin/g++-4.6 -compiler.g46.name=g++ 4.6 -compiler.g47.exe=/usr/bin/g++-4.7 -compiler.g47.name=g++ 4.7 -compiler.g48.exe=/usr/bin/g++-4.8 -compiler.g48.name=g++ 4.8 -compiler.g5.exe=/usr/bin/g++-5 -compiler.g5.name=g++ 5.x -compiler.g6x.exe=/usr/bin/g++-6 -compiler.g6x.name=g++ 6.x -compiler.g6x.alias=g6 -compiler.g7.exe=/usr/bin/g++-7 -compiler.g7.name=g++ 7.x -compiler.g8.exe=/usr/bin/g++-8 -compiler.g8.name=g++ 8.x -compiler.g9.exe=/usr/bin/g++-9 -compiler.g9.name=g++ 9.x compiler.g10.exe=/usr/bin/g++-10 compiler.g10.name=g++ 10.x compiler.g11.exe=/usr/bin/g++-11 compiler.g11.name=g++ 11.x +compiler.g12.exe=/usr/bin/g++-12 +compiler.g12.name=g++ 12.x compiler.gdefault.exe=/usr/bin/g++ compiler.gdefault.name=g++ default -group.clang.compilers=clang7:clang8:clang9:clang10:clang11:clang12:clangdefault +group.clang.compilers=clang13:clang14:clang15:clang16:clang17:clang18:clangdefault group.clang.intelAsm=-mllvm --x86-asm-syntax=intel group.clang.compilerType=clang group.clang.compilerCategories=clang -compiler.clang7.exe=/usr/bin/clang++-7 -compiler.clang7.name=clang 7 -compiler.clang8.exe=/usr/bin/clang++-8 -compiler.clang8.name=clang 8 -compiler.clang9.exe=/usr/bin/clang++-9 -compiler.clang9.name=clang 9 -compiler.clang10.exe=/usr/bin/clang++-10 -compiler.clang10.name=clang 10 -compiler.clang11.exe=/usr/bin/clang++-11 -compiler.clang11.name=clang 11 -compiler.clang12.exe=/usr/bin/clang++-12 -compiler.clang12.name=clang 12 +compiler.clang13.exe=/usr/bin/clang++-13 +compiler.clang13.name=clang 13 +compiler.clang14.exe=/usr/bin/clang++-14 +compiler.clang14.name=clang 14 +compiler.clang15.exe=/usr/bin/clang++-15 +compiler.clang15.name=clang 15 +compiler.clang16.exe=/usr/bin/clang++-16 +compiler.clang16.name=clang 16 +compiler.clang17.exe=/usr/bin/clang++-17 +compiler.clang17.name=clang 17 +compiler.clang18.exe=/usr/bin/clang++-18 +compiler.clang18.name=clang 18 compiler.clangdefault.exe=/usr/bin/clang++ compiler.clangdefault.name=clang default -tools=clangquerydefault:clangtidydefault:clangquery7:clangquery8:clangquery9:clangquery10:clangquery11:clangquery12:strings:ldd:readelf:nm:llvmdwarfdumpdefault +tools=clangquerydefault:clangtidydefault:clangquery13:clangquery14:clangquery15:clangquery16:clangquery17:clangquery18:strings:ldd:readelf:nm:llvmdwarfdumpdefault tools.clangquerydefault.exe=/usr/bin/clang-query tools.clangquerydefault.name=clang-query (default) @@ -65,41 +46,41 @@ tools.clangtidydefault.type=independent tools.clangtidydefault.class=clang-tidy-tool tools.clangtidydefault.stdinHint=disabled -tools.clangquery7.exe=/usr/bin/clang-query-7 -tools.clangquery7.name=clang-query 7 -tools.clangquery7.type=independent -tools.clangquery7.class=clang-query-tool -tools.clangquery7.stdinHint=Query commands +tools.clangquery13.exe=/usr/bin/clang-query-13 +tools.clangquery13.name=clang-query 13 +tools.clangquery13.type=independent +tools.clangquery13.class=clang-query-tool +tools.clangquery13.stdinHint=Query commands -tools.clangquery8.exe=/usr/bin/clang-query-8 -tools.clangquery8.name=clang-query 8 -tools.clangquery8.type=independent -tools.clangquery8.class=clang-query-tool -tools.clangquery8.stdinHint=Query commands +tools.clangquery14.exe=/usr/bin/clang-query-14 +tools.clangquery14.name=clang-query 14 +tools.clangquery14.type=independent +tools.clangquery14.class=clang-query-tool +tools.clangquery14.stdinHint=Query commands -tools.clangquery9.exe=/usr/bin/clang-query-9 -tools.clangquery9.name=clang-query 9 -tools.clangquery9.type=independent -tools.clangquery9.class=clang-query-tool -tools.clangquery9.stdinHint=Query commands +tools.clangquery15.exe=/usr/bin/clang-query-15 +tools.clangquery15.name=clang-query 15 +tools.clangquery15.type=independent +tools.clangquery15.class=clang-query-tool +tools.clangquery15.stdinHint=Query commands -tools.clangquery10.exe=/usr/bin/clang-query-10 -tools.clangquery10.name=clang-query 10 -tools.clangquery10.type=independent -tools.clangquery10.class=clang-query-tool -tools.clangquery10.stdinHint=Query commands +tools.clangquery16.exe=/usr/bin/clang-query-16 +tools.clangquery16.name=clang-query 16 +tools.clangquery16.type=independent +tools.clangquery16.class=clang-query-tool +tools.clangquery16.stdinHint=Query commands -tools.clangquery11.exe=/usr/bin/clang-query-11 -tools.clangquery11.name=clang-query 11 -tools.clangquery11.type=independent -tools.clangquery11.class=clang-query-tool -tools.clangquery11.stdinHint=Query commands +tools.clangquery17.exe=/usr/bin/clang-query-17 +tools.clangquery17.name=clang-query 17 +tools.clangquery17.type=independent +tools.clangquery17.class=clang-query-tool +tools.clangquery17.stdinHint=Query commands -tools.clangquery12.exe=/usr/bin/clang-query-12 -tools.clangquery12.name=clang-query 12 -tools.clangquery12.type=independent -tools.clangquery12.class=clang-query-tool -tools.clangquery12.stdinHint=Query commands +tools.clangquery18.exe=/usr/bin/clang-query-18 +tools.clangquery18.name=clang-query 18 +tools.clangquery18.type=independent +tools.clangquery18.class=clang-query-tool +tools.clangquery18.stdinHint=Query commands tools.ldd.name=ldd tools.ldd.exe=/usr/bin/ldd diff --git a/lib/compilers/d8.ts b/lib/compilers/d8.ts index 21d17ac4d..7d482ef18 100644 --- a/lib/compilers/d8.ts +++ b/lib/compilers/d8.ts @@ -306,6 +306,7 @@ export class D8Compiler extends BaseCompiler implements SimpleOutputFilenameComp } override async getVersion() { + logger.info(`Gathering ${this.compiler.id} version information on ${this.compiler.exe}...`); const versionFile = path.join(path.dirname(this.compiler.exe), 'r8-version.properties'); const versionInfo = await utils.tryReadTextFile(versionFile); const versionCode = (() => { diff --git a/lib/compilers/dex2oat.ts b/lib/compilers/dex2oat.ts index 7d7973e06..d87e5447c 100644 --- a/lib/compilers/dex2oat.ts +++ b/lib/compilers/dex2oat.ts @@ -38,9 +38,9 @@ import type {ParseFiltersAndOutputOptions} from '../../types/features/filters.in import type {SelectedLibraryVersion} from '../../types/libraries/libraries.interfaces.js'; import {BaseCompiler} from '../base-compiler.js'; import {CompilationEnvironment} from '../compilation-env.js'; +import {logger} from '../logger.js'; import {Dex2OatPassDumpParser} from '../parsers/dex2oat-pass-dump-parser.js'; import * as utils from '../utils.js'; - import {D8Compiler} from './d8.js'; const BOOTCLASSPATH_JARS = [ @@ -382,6 +382,7 @@ export class Dex2OatCompiler extends BaseCompiler { // dex2oat doesn't have --version, but artArtifactDir contains a file with // the build number. override async getVersion() { + logger.info(`Gathering ${this.compiler.id} version information on ${this.compiler.exe}...`); const versionFile = this.artArtifactDir + '/snapshot-creation-build-number.txt'; const version = await fs.readFile(versionFile, {encoding: 'utf8'}); return { diff --git a/lib/compilers/win32-vc.ts b/lib/compilers/win32-vc.ts index 2ce3c475b..440f3c0a9 100644 --- a/lib/compilers/win32-vc.ts +++ b/lib/compilers/win32-vc.ts @@ -26,8 +26,8 @@ import path from 'node:path'; import type {PreliminaryCompilerInfo} from '../../types/compiler.interfaces.js'; import {CompilationEnvironment} from '../compilation-env.js'; +import {logger} from '../logger.js'; import {VcAsmParser} from '../parsers/asm-parser-vc.js'; - import {VCParser} from './argument-parsers.js'; import {Win32Compiler} from './win32.js'; @@ -76,4 +76,25 @@ export class Win32VcCompiler extends Win32Compiler { return args; } + + override async getVersion() { + logger.info(`Gathering ${this.compiler.id} version information on ${this.compiler.exe}...`); + if (this.compiler.explicitVersion) { + logger.debug(`${this.compiler.id} has forced version output: ${this.compiler.explicitVersion}`); + return {stdout: this.compiler.explicitVersion, stderr: '', code: 0}; + } + const execOptions = this.getDefaultExecOptions(); + const versionFlag = this.compiler.versionFlag || ['--version']; + execOptions.timeoutMs = 0; // No timeout for --version. A sort of workaround for slow EFS/NFS on the prod site + execOptions.ldPath = this.getSharedLibraryPathsAsLdLibraryPaths([]); + + try { + const res = await this.execCompilerCached(this.compiler.exe, versionFlag, execOptions); + // For msvc version info is output to stderr. stdout contains a dump of switches. + return {stdout: res.stderr, stderr: '', code: res.code}; + } catch (err) { + logger.error(`Unable to get version for compiler '${this.compiler.exe}' - ${err}`); + return null; + } + } } diff --git a/lib/compilers/wyrm.ts b/lib/compilers/wyrm.ts index f29ba1309..7255b35b8 100644 --- a/lib/compilers/wyrm.ts +++ b/lib/compilers/wyrm.ts @@ -30,6 +30,7 @@ import type {ParseFiltersAndOutputOptions} from '../../types/features/filters.in import {unwrap} from '../assert.js'; import {BaseCompiler} from '../base-compiler.js'; import {CompilationEnvironment} from '../compilation-env.js'; +import {logger} from '../logger.js'; export class WyrmCompiler extends BaseCompiler { static get key() { @@ -75,6 +76,7 @@ export class WyrmCompiler extends BaseCompiler { } override async getVersion() { + logger.info(`Gathering ${this.compiler.id} version information on ${this.compiler.exe}...`); return { stdout: 'trunk', stderr: '',