aboutsummaryrefslogtreecommitdiff
path: root/lib/compilers/zigcc.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/compilers/zigcc.js')
-rw-r--r--lib/compilers/zigcc.js14
1 files changed, 10 insertions, 4 deletions
diff --git a/lib/compilers/zigcc.js b/lib/compilers/zigcc.js
index 689af9e7b..6dccaea1d 100644
--- a/lib/compilers/zigcc.js
+++ b/lib/compilers/zigcc.js
@@ -22,13 +22,19 @@
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
-import { ClangCompiler } from './clang';
+import Semver from 'semver';
+
+import {asSafeVer} from '../utils';
+
+import {ClangCompiler} from './clang';
export class ZigCC extends ClangCompiler {
- static get key() { return 'zigcc'; }
+ static get key() {
+ return 'zigcc';
+ }
preProcess(source, filters) {
- if (this.compiler.semver !== '0.6.0') {
+ if (Semver.eq(asSafeVer(this.compiler.semver), '0.6.0', true)) {
filters.binary = true;
}
@@ -36,7 +42,7 @@ export class ZigCC extends ClangCompiler {
}
optionsForFilter(filters, outputFilename) {
- if (this.compiler.semver !== '0.6.0') {
+ if (Semver.eq(asSafeVer(this.compiler.semver), '0.6.0', true)) {
// note: zig versions > 0.6 don't emit asm, only binary works - https://github.com/ziglang/zig/issues/8153
filters.binary = true;
}