diff options
Diffstat (limited to 'lib/compilers/zig.js')
-rw-r--r-- | lib/compilers/zig.js | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/lib/compilers/zig.js b/lib/compilers/zig.js index a4755ce98..3b6380a1f 100644 --- a/lib/compilers/zig.js +++ b/lib/compilers/zig.js @@ -53,12 +53,22 @@ class ZigCompiler extends BaseCompiler { } optionsForFilter(filters, outputFilename, userOptions) { - let options = [ - 'build-obj', - '--cache-dir', path.dirname(outputFilename), - '--output', this.filename(outputFilename), - '--output-h', '/dev/null' - ]; + let options; + if (filters.execute) { + options = [ + 'build', + '--cache-dir', path.dirname(outputFilename), + '--output', this.filename(outputFilename), + '--output-h', '/dev/null' + ]; + } else { + options = [ + 'build-obj', + '--cache-dir', path.dirname(outputFilename), + '--output', this.filename(outputFilename), + '--output-h', '/dev/null' + ]; + } if (!filters.binary) { let userRequestedEmit = _.any(userOptions, opt => opt.indexOf("--emit") > -1); |