aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--etc/config/hylo.amazon.properties3
-rw-r--r--lib/base-compiler.ts6
-rw-r--r--lib/compiler-finder.ts4
-rw-r--r--types/compiler.interfaces.ts1
4 files changed, 12 insertions, 2 deletions
diff --git a/etc/config/hylo.amazon.properties b/etc/config/hylo.amazon.properties
index ed25bc927..e5b1aacaf 100644
--- a/etc/config/hylo.amazon.properties
+++ b/etc/config/hylo.amazon.properties
@@ -11,7 +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
-group.hylo.linkerPath=/opt/compiler-explorer/clang-15.0.0/bin
+# 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)
diff --git a/lib/base-compiler.ts b/lib/base-compiler.ts
index 3c1be64ff..a86e64975 100644
--- a/lib/base-compiler.ts
+++ b/lib/base-compiler.ts
@@ -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,
};
}
diff --git a/lib/compiler-finder.ts b/lib/compiler-finder.ts
index f977dcec2..e97b29fed 100644
--- a/lib/compiler-finder.ts
+++ b/lib/compiler-finder.ts
@@ -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,
diff --git a/types/compiler.interfaces.ts b/types/compiler.interfaces.ts
index d704e7e4a..320ba459f 100644
--- a/types/compiler.interfaces.ts
+++ b/types/compiler.interfaces.ts
@@ -99,6 +99,7 @@ export type CompilerInfo = {
libpathFlag: string;
libPath: string[];
ldPath: string[];
+ extraPath: string[];
// [env, setting][]
envVars: [string, string][];
notification: string;