diff options
Diffstat (limited to 'lib/compilers/zig.js')
-rw-r--r-- | lib/compilers/zig.js | 5 |
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), |