aboutsummaryrefslogtreecommitdiff
path: root/lib/compilers/typescript-native.ts
diff options
context:
space:
mode:
authorASDAlexander77 <duzhar@googlemail.com>2023-06-06 19:43:54 +0100
committerASDAlexander77 <duzhar@googlemail.com>2023-06-06 19:43:54 +0100
commiteb65885ab75dd6474edb9aa61190efb9135a90e1 (patch)
tree9f9296c20558809021fbd9f544f9bc3d8b6ed56a /lib/compilers/typescript-native.ts
parent7e45fa9f2e6bc1e138389aad3c5b3d6fe3294d79 (diff)
downloadcompiler-explorer-eb65885ab75dd6474edb9aa61190efb9135a90e1.tar.gz
compiler-explorer-eb65885ab75dd6474edb9aa61190efb9135a90e1.zip
improved version control
Diffstat (limited to 'lib/compilers/typescript-native.ts')
-rw-r--r--lib/compilers/typescript-native.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/compilers/typescript-native.ts b/lib/compilers/typescript-native.ts
index 5923fc6fb..fd05a3521 100644
--- a/lib/compilers/typescript-native.ts
+++ b/lib/compilers/typescript-native.ts
@@ -36,7 +36,7 @@ export class TypeScriptNativeCompiler extends BaseCompiler {
tscJit: string;
tscSharedLib: string;
- tscVersion: string;
+ tscVersion: string[];
constructor(compilerInfo: PreliminaryCompilerInfo, env) {
super(compilerInfo, env);
@@ -44,9 +44,9 @@ export class TypeScriptNativeCompiler extends BaseCompiler {
this.compiler.supportsIntel = false;
this.compiler.supportsIrView = true;
- this.tscJit = this.compilerProps<string>(`compiler.${this.compiler.id}.exe`);
+ this.tscJit = this.compiler.exe;
this.tscSharedLib = this.compilerProps<string>(`compiler.${this.compiler.id}.sharedlibs`);
- this.tscVersion = /tsc-\d+\.\d+-pre-alpha(\d+)/g.exec(this.tscJit)?.[1] || "0";
+ this.tscVersion = (this.compiler.semver || "0.0.0").split('.');
}
override getSharedLibraryPathsAsArguments() {
@@ -105,7 +105,7 @@ export class TypeScriptNativeCompiler extends BaseCompiler {
override async generateIR(inputFilename: string, options: string[], filters: ParseFiltersAndOutputOptions) {
// These options make Clang produce an IR
let newOptions = ['--emit=llvm', inputFilename];
- const newVersion = parseInt(this.tscVersion) >= 33;
+ const newVersion = parseInt(this.tscVersion[2]) >= 33;
if (newVersion)
{
newOptions = ['--emit=llvm', '-o=-', inputFilename];