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.
This commit is contained in:
@@ -5,10 +5,7 @@ const builtin = @import("builtin");
|
||||
// run-time glibc version needs to be new enough. Check the host's glibc
|
||||
// version. Note that this does not allow for translation/vm/emulation
|
||||
// services to run these tests.
|
||||
const running_glibc_ver: ?std.SemanticVersion = switch (builtin.os.tag) {
|
||||
.linux => builtin.os.version_range.linux.glibc,
|
||||
else => null,
|
||||
};
|
||||
const running_glibc_ver = builtin.os.versionRange().gnuLibCVersion();
|
||||
|
||||
pub fn build(b: *std.Build) void {
|
||||
const test_step = b.step("test", "Test");
|
||||
|
||||
@@ -21,7 +21,7 @@ const c_string = @cImport(
|
||||
);
|
||||
|
||||
// Version of glibc this test is being built to run against
|
||||
const glibc_ver = builtin.target.os.version_range.linux.glibc;
|
||||
const glibc_ver = builtin.os.versionRange().gnuLibCVersion().?;
|
||||
|
||||
// PR #17034 - fstat moved between libc_nonshared and libc
|
||||
fn checkStat() !void {
|
||||
|
||||
Reference in New Issue
Block a user