aboutsummaryrefslogtreecommitdiff
path: root/lib/compilers/zig.js
diff options
context:
space:
mode:
authorHaze Booth <isnt@haze.cool>2019-11-27 21:34:50 -0500
committerHaze Booth <isnt@haze.cool>2019-11-27 21:43:59 -0500
commiteb3df6f260032c8eb0e2f0a7dce914590d91bbcf (patch)
tree343912587e125b7d262078aa4545dd6b3dc8edea /lib/compilers/zig.js
parent9f055b12948e85e6d43235c2e2d78faf27fe2439 (diff)
downloadcompiler-explorer-eb3df6f260032c8eb0e2f0a7dce914590d91bbcf.tar.gz
compiler-explorer-eb3df6f260032c8eb0e2f0a7dce914590d91bbcf.zip
Fix ASM output on for the zig compiler
Diffstat (limited to 'lib/compilers/zig.js')
-rw-r--r--lib/compilers/zig.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/compilers/zig.js b/lib/compilers/zig.js
index e65963999..ca8225fc7 100644
--- a/lib/compilers/zig.js
+++ b/lib/compilers/zig.js
@@ -63,9 +63,12 @@ class ZigCompiler extends BaseCompiler {
let options = [filters.execute ? 'build-exe' : 'build-obj'];
if (this.compiler.semver === 'trunk' || Semver.gt(this.compiler.semver, '0.3.0')) {
const outputDir = path.dirname(outputFilename);
+ const desiredName = path.basename(outputFilename);
+ // strip '.s' if we aren't executing
+ const name = filters.execute ? desiredName : desiredName.slice(0, -2);
options.push('--cache-dir', outputDir,
'--output-dir', outputDir,
- '--name', path.basename(outputFilename));
+ '--name', name);
} else {
// Older versions use a different command line interface (#1304)
options.push('--cache-dir', path.dirname(outputFilename),