diff options
author | emekoi <emekankurumeh@outlook.com> | 2019-10-17 09:12:06 -0500 |
---|---|---|
committer | emekoi <emekankurumeh@outlook.com> | 2019-10-17 09:12:06 -0500 |
commit | aa65c04f803606b23b5ca7adb88c06df4ffd188b (patch) | |
tree | c311c8c6ff209f7b1ca12d10404f2be6339c04d3 /lib/compilers | |
parent | 5b0f785ad7249e41545b046394bc3236d6692303 (diff) | |
download | compiler-explorer-aa65c04f803606b23b5ca7adb88c06df4ffd188b.tar.gz compiler-explorer-aa65c04f803606b23b5ca7adb88c06df4ffd188b.zip |
added llvm-ir emit support for zig
Diffstat (limited to 'lib/compilers')
-rw-r--r-- | lib/compilers/zig.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/compilers/zig.js b/lib/compilers/zig.js index 545017be0..e65963999 100644 --- a/lib/compilers/zig.js +++ b/lib/compilers/zig.js @@ -31,6 +31,8 @@ class ZigCompiler extends BaseCompiler { constructor(info, env) { super(info, env); this.compiler.supportsIntel = true; + this.compiler.supportsIrView = true; + this.compiler.irArg = ['--emit', 'llvm-ir']; } getSharedLibraryPathsAsArguments() { @@ -81,6 +83,11 @@ class ZigCompiler extends BaseCompiler { return options; } + getIrOutputFilename(inputFilename) { + return this.getOutputFilename(path.dirname(inputFilename), this.outputFilebase) + .replace('.s', '.ll'); + } + filterUserOptions(userOptions) { const blacklist = /^(((--(cache-dir|name|output|verbose))|(-mllvm)).*)$/; return _.filter(userOptions, option => !blacklist.test(option)); |