aboutsummaryrefslogtreecommitdiff
path: root/lib/compilers/zig.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/compilers/zig.js')
-rw-r--r--lib/compilers/zig.js7
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));