diff options
Diffstat (limited to 'lib/compilers/zig.js')
-rw-r--r-- | lib/compilers/zig.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/compilers/zig.js b/lib/compilers/zig.js index 5133b8eb6..daa2f61d5 100644 --- a/lib/compilers/zig.js +++ b/lib/compilers/zig.js @@ -50,8 +50,8 @@ class ZigCompiler extends BaseCompiler { '--output', this.filename(outputFilename) ]; - let userRequestedEmit = _.any(userOptions, opt => opt.indexOf("--emit") > -1); if (!filters.binary) { + let userRequestedEmit = _.any(userOptions, opt => opt.indexOf("--emit") > -1); if (!userRequestedEmit) { options = options.concat('--emit', 'asm'); } @@ -59,6 +59,11 @@ class ZigCompiler extends BaseCompiler { } return options; } + + filterUserOptions(userOptions) { + const blacklist = /^(((--(cache-dir|name|output|verbose))|(-mllvm)).*)$/; + return _.filter(userOptions, option => !blacklist.test(option)); + } } module.exports = ZigCompiler; |