diff options
| author | Alex Rønne Petersen <alex@alexrp.com> | 2024-11-23 17:57:39 +0100 |
|---|---|---|
| committer | Alex Rønne Petersen <alex@alexrp.com> | 2024-11-24 22:11:16 +0100 |
| commit | 24ecf45569f10743c5df6a39e6e71dcee265786a (patch) | |
| tree | a2ed9bb83aa902511e10acc66d6d141b6d895e46 /src/Compilation.zig | |
| parent | 6d781e0955e7dd2b6cc17a5bb43c790e19a07ac0 (diff) | |
| download | zig-24ecf45569f10743c5df6a39e6e71dcee265786a.tar.gz zig-24ecf45569f10743c5df6a39e6e71dcee265786a.zip | |
std.Target: Add Os.HurdVersionRange for Os.Tag.hurd.
This is necessary since isGnuLibC() is true for hurd, so we need to be able to
represent a glibc version for it.
Also add an Os.TaggedVersionRange.gnuLibCVersion() convenience function.
Diffstat (limited to 'src/Compilation.zig')
| -rw-r--r-- | src/Compilation.zig | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Compilation.zig b/src/Compilation.zig index 3ad5c7932f..cc3807b1c9 100644 --- a/src/Compilation.zig +++ b/src/Compilation.zig @@ -5315,7 +5315,7 @@ pub fn addCCArgs( if (comp.config.link_libc) { if (target.isGnuLibC()) { - const target_version = target.os.version_range.linux.glibc; + const target_version = target.os.versionRange().gnuLibCVersion().?; const glibc_minor_define = try std.fmt.allocPrint(arena, "-D__GLIBC_MINOR__={d}", .{ target_version.minor, }); |
