aboutsummaryrefslogtreecommitdiff
path: root/lib/compilers/zig.js
diff options
context:
space:
mode:
authorPartouf <partouf@gmail.com>2018-11-06 20:33:01 +0100
committerPartouf <partouf@gmail.com>2018-11-06 20:33:01 +0100
commit45b97cb95fcfaaec9483ca6c5ef74d9f7a315a22 (patch)
tree03d6a797ab78ebc9d7af958dc23a59aeabd3de6c /lib/compilers/zig.js
parent2e7a58bfb447f32dfe792ce3cfffd08b09186138 (diff)
downloadcompiler-explorer-45b97cb95fcfaaec9483ca6c5ef74d9f7a315a22.tar.gz
compiler-explorer-45b97cb95fcfaaec9483ca6c5ef74d9f7a315a22.zip
exec for zig
Diffstat (limited to 'lib/compilers/zig.js')
-rw-r--r--lib/compilers/zig.js22
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);