mirror of
https://github.com/ziglang/zig.git
synced 2026-02-12 20:37:54 +00:00
add builtin.zig_version_string
sometimes this is more useful than SemanticVersion
This commit is contained in:
parent
6f717b18f0
commit
6d88c3e935
@ -5056,7 +5056,8 @@ pub fn generateBuiltinZigSource(comp: *Compilation, allocator: Allocator) Alloca
|
||||
\\const std = @import("std");
|
||||
\\/// Zig version. When writing code that supports multiple versions of Zig, prefer
|
||||
\\/// feature detection (i.e. with `@hasDecl` or `@hasField`) over version checks.
|
||||
\\pub const zig_version = std.SemanticVersion.parse("{s}") catch unreachable;
|
||||
\\pub const zig_version = std.SemanticVersion.parse(zig_version_string) catch unreachable;
|
||||
\\pub const zig_version_string = "{s}";
|
||||
\\pub const zig_backend = std.builtin.CompilerBackend.{};
|
||||
\\
|
||||
\\pub const output_mode = std.builtin.OutputMode.{};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user