aboutsummaryrefslogtreecommitdiff
path: root/lib/compilers
diff options
context:
space:
mode:
Diffstat (limited to 'lib/compilers')
-rw-r--r--lib/compilers/avrgcc6502.ts6
-rw-r--r--lib/compilers/clang.ts2
-rw-r--r--lib/compilers/dosbox-compiler.ts4
-rw-r--r--lib/compilers/dotnet.ts8
-rw-r--r--lib/compilers/golang.ts6
-rw-r--r--lib/compilers/python.ts3
-rw-r--r--lib/compilers/racket.ts2
-rw-r--r--lib/compilers/rga.ts2
-rw-r--r--lib/compilers/rust.ts2
-rw-r--r--lib/compilers/spirv.ts4
10 files changed, 20 insertions, 19 deletions
diff --git a/lib/compilers/avrgcc6502.ts b/lib/compilers/avrgcc6502.ts
index 53895f93d..422348288 100644
--- a/lib/compilers/avrgcc6502.ts
+++ b/lib/compilers/avrgcc6502.ts
@@ -38,9 +38,9 @@ export class AvrGcc6502Compiler extends BaseCompiler {
constructor(compilerInfo, env) {
super(compilerInfo, env);
- this.avrgccpath = this.compilerProps(`compiler.${this.compiler.id}.avrgccpath`);
- this.xapath = this.compilerProps(`compiler.${this.compiler.id}.xapath`);
- this.avrlibstdcpppath = this.compilerProps(`compiler.${this.compiler.id}.avrlibstdcpppath`);
+ this.avrgccpath = this.compilerProps<string>(`compiler.${this.compiler.id}.avrgccpath`);
+ this.xapath = this.compilerProps<string>(`compiler.${this.compiler.id}.xapath`);
+ this.avrlibstdcpppath = this.compilerProps<string>(`compiler.${this.compiler.id}.avrlibstdcpppath`);
this.outputFilebase = 'example';
}
diff --git a/lib/compilers/clang.ts b/lib/compilers/clang.ts
index 791f32cdd..3343c8419 100644
--- a/lib/compilers/clang.ts
+++ b/lib/compilers/clang.ts
@@ -62,7 +62,7 @@ export class ClangCompiler extends BaseCompiler {
if (fs.existsSync(llvmDisassemblerPath)) {
this.llvmDisassemblerPath = llvmDisassemblerPath;
} else {
- this.llvmDisassemblerPath = this.compilerProps('llvmDisassembler');
+ this.llvmDisassemblerPath = this.compilerProps<string | undefined>('llvmDisassembler');
}
}
diff --git a/lib/compilers/dosbox-compiler.ts b/lib/compilers/dosbox-compiler.ts
index 2d48d2c62..8ece53ded 100644
--- a/lib/compilers/dosbox-compiler.ts
+++ b/lib/compilers/dosbox-compiler.ts
@@ -38,8 +38,8 @@ export class DosboxCompiler extends BaseCompiler {
constructor(compilerInfo, env) {
super(compilerInfo, env);
- this.dosbox = this.compilerProps(`compiler.${this.compiler.id}.dosbox`);
- this.root = this.compilerProps(`compiler.${this.compiler.id}.root`);
+ this.dosbox = this.compilerProps<string>(`compiler.${this.compiler.id}.dosbox`);
+ this.root = this.compilerProps<string>(`compiler.${this.compiler.id}.root`);
this.asm = new TurboCAsmParser(this.compilerProps);
}
diff --git a/lib/compilers/dotnet.ts b/lib/compilers/dotnet.ts
index d712b2b76..e7001427d 100644
--- a/lib/compilers/dotnet.ts
+++ b/lib/compilers/dotnet.ts
@@ -39,10 +39,10 @@ class DotNetCompiler extends BaseCompiler {
constructor(compilerInfo, env) {
super(compilerInfo, env);
- this.targetFramework = this.compilerProps(`compiler.${this.compiler.id}.targetFramework`);
- this.buildConfig = this.compilerProps(`compiler.${this.compiler.id}.buildConfig`);
- this.clrBuildDir = this.compilerProps(`compiler.${this.compiler.id}.clrDir`);
- this.langVersion = this.compilerProps(`compiler.${this.compiler.id}.langVersion`);
+ this.targetFramework = this.compilerProps<string>(`compiler.${this.compiler.id}.targetFramework`);
+ this.buildConfig = this.compilerProps<string>(`compiler.${this.compiler.id}.buildConfig`);
+ this.clrBuildDir = this.compilerProps<string>(`compiler.${this.compiler.id}.clrDir`);
+ this.langVersion = this.compilerProps<string>(`compiler.${this.compiler.id}.langVersion`);
this.asm = new DotNetAsmParser();
}
diff --git a/lib/compilers/golang.ts b/lib/compilers/golang.ts
index 00ef80d6c..b1de66884 100644
--- a/lib/compilers/golang.ts
+++ b/lib/compilers/golang.ts
@@ -57,9 +57,9 @@ export class GolangCompiler extends BaseCompiler {
constructor(compilerInfo, env) {
super(compilerInfo, env);
- const goroot = this.compilerProps(`compiler.${this.compiler.id}.goroot`);
- const goarch = this.compilerProps(`compiler.${this.compiler.id}.goarch`);
- const goos = this.compilerProps(`compiler.${this.compiler.id}.goos`);
+ const goroot = this.compilerProps<string | undefined>(`compiler.${this.compiler.id}.goroot`);
+ const goarch = this.compilerProps<string | undefined>(`compiler.${this.compiler.id}.goarch`);
+ const goos = this.compilerProps<string | undefined>(`compiler.${this.compiler.id}.goos`);
this.GOENV = {};
if (goroot) {
diff --git a/lib/compilers/python.ts b/lib/compilers/python.ts
index a9a2f2c5a..1036f2222 100644
--- a/lib/compilers/python.ts
+++ b/lib/compilers/python.ts
@@ -40,7 +40,8 @@ export class PythonCompiler extends BaseCompiler {
this.compiler.demangler = '';
this.demanglerClass = null;
this.disasmScriptPath =
- this.compilerProps('disasmScript') || resolvePathFromAppRoot('etc', 'scripts', 'disasms', 'dis_all.py');
+ this.compilerProps<string>('disasmScript') ||
+ resolvePathFromAppRoot('etc', 'scripts', 'disasms', 'dis_all.py');
}
override processAsm(result) {
diff --git a/lib/compilers/racket.ts b/lib/compilers/racket.ts
index d64b5d5a0..68bbec757 100644
--- a/lib/compilers/racket.ts
+++ b/lib/compilers/racket.ts
@@ -42,7 +42,7 @@ export class RacketCompiler extends BaseCompiler {
info.disabledFilters = ['labels', 'directives', 'commentOnly', 'trim'];
}
super(info, env);
- this.raco = this.compilerProps(`compiler.${this.compiler.id}.raco`);
+ this.raco = this.compilerProps<string>(`compiler.${this.compiler.id}.raco`);
}
override optionsForFilter(filters: ParseFilters, outputFilename: string, userOptions?: string[]): string[] {
diff --git a/lib/compilers/rga.ts b/lib/compilers/rga.ts
index 36ffcc206..050e7499c 100644
--- a/lib/compilers/rga.ts
+++ b/lib/compilers/rga.ts
@@ -50,7 +50,7 @@ export class RGACompiler extends BaseCompiler {
super(info, env);
this.compiler.supportsIntel = false;
- this.dxcPath = this.compilerProps(`compiler.${this.compiler.id}.dxcPath`);
+ this.dxcPath = this.compilerProps<string>(`compiler.${this.compiler.id}.dxcPath`);
logger.debug(`RGA compiler ${this.compiler.id} configured to use DXC at ${this.dxcPath}`);
}
diff --git a/lib/compilers/rust.ts b/lib/compilers/rust.ts
index bde2109c0..28345e335 100644
--- a/lib/compilers/rust.ts
+++ b/lib/compilers/rust.ts
@@ -58,7 +58,7 @@ export class RustCompiler extends BaseCompiler {
this.compiler.llvmOptArg = ['-C', 'llvm-args=-print-after-all -print-before-all'];
this.compiler.llvmOptModuleScopeArg = ['-C', 'llvm-args=-print-module-scope'];
this.compiler.llvmOptNoDiscardValueNamesArg = isNightly ? ['-Z', 'fewer-names=no'] : [];
- this.linker = this.compilerProps('linker');
+ this.linker = this.compilerProps<string>('linker');
}
override getSharedLibraryPathsAsArguments(libraries, libDownloadPath) {
diff --git a/lib/compilers/spirv.ts b/lib/compilers/spirv.ts
index 14c00e6d0..b94fd638d 100644
--- a/lib/compilers/spirv.ts
+++ b/lib/compilers/spirv.ts
@@ -44,8 +44,8 @@ export class SPIRVCompiler extends BaseCompiler {
this.asm = new SPIRVAsmParser(this.compilerProps);
- this.translatorPath = this.compilerProps('translatorPath');
- this.disassemblerPath = this.compilerProps('disassemblerPath');
+ this.translatorPath = this.compilerProps<string>('translatorPath');
+ this.disassemblerPath = this.compilerProps<string>('disassemblerPath');
}
override prepareArguments(userOptions, filters, backendOptions, inputFilename, outputFilename, libraries) {