mirror of
https://github.com/ziglang/zig.git
synced 2025-12-24 23:23:07 +00:00
stage2: error if requested glibc version too high
Falling back to the max provided glibc version is insufficient as linking to shared objects compiled against the requested version will fail.
This commit is contained in:
parent
5ac91794cc
commit
01e30002c5
@ -764,16 +764,17 @@ pub fn buildSharedObjects(comp: *Compilation) !void {
|
||||
.lt => continue,
|
||||
.gt => {
|
||||
// TODO Expose via compile error mechanism instead of log.
|
||||
std.log.warn("invalid target glibc version: {}", .{target_version});
|
||||
std.log.err("invalid target glibc version: {}", .{target_version});
|
||||
return error.InvalidTargetGLibCVersion;
|
||||
},
|
||||
}
|
||||
} else blk: {
|
||||
} else {
|
||||
const latest_index = metadata.all_versions.len - 1;
|
||||
std.log.warn("zig cannot build new glibc version {}; providing instead {}", .{
|
||||
// TODO Expose via compile error mechanism instead of log.
|
||||
std.log.err("zig does not yet provide glibc version {}, the max provided version is {}", .{
|
||||
target_version, metadata.all_versions[latest_index],
|
||||
});
|
||||
break :blk latest_index;
|
||||
return error.InvalidTargetGLibCVersion;
|
||||
};
|
||||
{
|
||||
var map_contents = std.ArrayList(u8).init(arena);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user