build.zig: ensure user zig matches program minimum
This commit is contained in:
parent
cd887838f7
commit
b434197fe8
@ -5,6 +5,10 @@ const shared = @import("src/shared.zig");
|
|||||||
const zls_version = std.builtin.Version{ .major = 0, .minor = 10, .patch = 0 };
|
const zls_version = std.builtin.Version{ .major = 0, .minor = 10, .patch = 0 };
|
||||||
|
|
||||||
pub fn build(b: *std.build.Builder) !void {
|
pub fn build(b: *std.build.Builder) !void {
|
||||||
|
const current_zig = builtin.zig_version;
|
||||||
|
const min_zig = std.SemanticVersion.parse("0.10.0-dev.4057+349d78a44") catch return; // std.zig.tokenizer.Token.Tag.number_literal added
|
||||||
|
if (current_zig.order(min_zig).compare(.lt)) @panic(exe.builder.fmt("Your Zig version v{} does not meet the minimum build requirement of v{}", .{current, min}));
|
||||||
|
|
||||||
const target = b.standardTargetOptions(.{});
|
const target = b.standardTargetOptions(.{});
|
||||||
|
|
||||||
const mode = b.standardReleaseOptions();
|
const mode = b.standardReleaseOptions();
|
||||||
|
Loading…
Reference in New Issue
Block a user