authorgravatar for mail@isaacfreund.comIsaac Freund <mail@isaacfreund.com> 2021-05-10 23:12:17+02:00
committergravatar for mail@isaacfreund.comIsaac Freund <mail@isaacfreund.com> 2021-05-11 21:30:13+02:00
log01e30002c52eda1ab3574f55c2e0568c56f2ed09
tree9930c4da623ccb1f200f9eb5f446c9930b5c35d6
parent5ac91794cce8bd53916a378815be01e4365d53d9
signaturelock-open Commit is signed but in an unrecognized format.

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.

1 files changed, 5 insertions(+), 4 deletions(-)

src/glibc.zig+5-4
......@@ -764,16 +764,17 @@ pub fn buildSharedObjects(comp: *Compilation) !void {
764764 .lt => continue,
765765 .gt => {
766766 // TODO Expose via compile error mechanism instead of log.
767 std.log.warn("invalid target glibc version: {}", .{target_version});
767 std.log.err("invalid target glibc version: {}", .{target_version});
768768 return error.InvalidTargetGLibCVersion;
769769 },
770770 }
771 } else blk: {
771 } else {
772772 const latest_index = metadata.all_versions.len - 1;
773 std.log.warn("zig cannot build new glibc version {}; providing instead {}", .{
773 // TODO Expose via compile error mechanism instead of log.
774 std.log.err("zig does not yet provide glibc version {}, the max provided version is {}", .{
774775 target_version, metadata.all_versions[latest_index],
775776 });
776 break :blk latest_index;
777 return error.InvalidTargetGLibCVersion;
777778 };
778779 {
779780 var map_contents = std.ArrayList(u8).init(arena);