mirror of
https://github.com/compiler-explorer/compiler-explorer.git
synced 2025-12-27 10:33:59 -05:00
Hylo fixes; specify PATH, and fix name (#5625)
- Add a general extraPaths for compilers and use it to let Hylo find clang++ Co-authored-by: Nick DeMarco <nickpdemarco@gmail.com>
This commit is contained in:
@@ -11,5 +11,8 @@ group.hylo.versionFlag=help
|
||||
group.hylo.licenseLink=https://github.com/hylo-lang/hylo/blob/main/LICENSE
|
||||
group.hylo.licenseName=Apache License 2.0
|
||||
group.hylo.licensePreamble=Copyright (c) 2020-2023, Hylo contributors
|
||||
# hylo needs to be able to find clang++ for linking
|
||||
group.hylo.extraPath=/opt/compiler-explorer/clang-15.0.0/bin
|
||||
|
||||
compiler.hylotrunk.exe=/opt/compiler-explorer/hylo-trunk/hc
|
||||
compiler.hylotrunk.name=Hylo (trunk)
|
||||
|
||||
@@ -431,10 +431,14 @@ export class BaseCompiler implements ICompiler {
|
||||
}
|
||||
|
||||
getDefaultExecOptions(): ExecutionOptions & {env: Record<string, string>} {
|
||||
const env = this.env.getEnv(this.compiler.needsMulti);
|
||||
if (this.compiler.extraPath) {
|
||||
env.PATH = this.compiler.extraPath.join(':') + ':' + env.PATH;
|
||||
}
|
||||
return {
|
||||
timeoutMs: this.env.ceProps('compileTimeoutMs', 7500),
|
||||
maxErrorOutput: this.env.ceProps('max-error-output', 5000),
|
||||
env: this.env.getEnv(this.compiler.needsMulti),
|
||||
env,
|
||||
wrapper: this.compilerWrapper,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -316,6 +316,10 @@ export class CompilerFinder {
|
||||
ldPath: props('ldPath', '')
|
||||
.split('|')
|
||||
.map(x => path.normalize(x.replace('${exePath}', exePath))),
|
||||
extraPath: props('extraPath', '')
|
||||
.split(path.delimiter)
|
||||
.filter(p => p !== '')
|
||||
.map(x => path.normalize(x.replace('${exePath}', exePath))),
|
||||
envVars: envVars,
|
||||
notification: props('notification', ''),
|
||||
isSemVer: isSemVer,
|
||||
|
||||
@@ -99,6 +99,7 @@ export type CompilerInfo = {
|
||||
libpathFlag: string;
|
||||
libPath: string[];
|
||||
ldPath: string[];
|
||||
extraPath: string[];
|
||||
// [env, setting][]
|
||||
envVars: [string, string][];
|
||||
notification: string;
|
||||
|
||||
Reference in New Issue
Block a user