mirror of
https://github.com/ziglang/zig.git
synced 2026-01-21 06:45:24 +00:00
target.zig: Constrain aarch64 to glibc version 2.17 or later
Had constrained the `aarch64_be` target, but not `aarch64`. This constraint is necessary because earlier versions of glibc do not support the aarch64 architecture. Also, skip unsupported test cases.
This commit is contained in:
parent
8bee879fc2
commit
ed795a907d
@ -12,7 +12,7 @@ pub const available_libcs = [_]ArchOsAbi{
|
||||
.{ .arch = .aarch64_be, .os = .linux, .abi = .gnu, .glibc_min = .{ .major = 2, .minor = 17, .patch = 0 } },
|
||||
.{ .arch = .aarch64_be, .os = .linux, .abi = .musl },
|
||||
.{ .arch = .aarch64_be, .os = .windows, .abi = .gnu },
|
||||
.{ .arch = .aarch64, .os = .linux, .abi = .gnu },
|
||||
.{ .arch = .aarch64, .os = .linux, .abi = .gnu, .glibc_min = .{ .major = 2, .minor = 17, .patch = 0 } },
|
||||
.{ .arch = .aarch64, .os = .linux, .abi = .musl },
|
||||
.{ .arch = .aarch64, .os = .windows, .abi = .gnu },
|
||||
.{ .arch = .aarch64, .os = .macos, .abi = .none, .os_ver = .{ .major = 11, .minor = 0, .patch = 0 } },
|
||||
|
||||
@ -47,6 +47,13 @@ pub fn build(b: *std.Build) void {
|
||||
|
||||
const glibc_ver = target.result.os.version_range.linux.glibc;
|
||||
|
||||
// only build test if glibc version supports the architecture
|
||||
if (target.result.cpu.arch.isAARCH64()) {
|
||||
if (glibc_ver.order(.{ .major = 2, .minor = 17, .patch = 0 }) == .lt) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
const exe = b.addExecutable(.{
|
||||
.name = t,
|
||||
.target = target,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user