diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2021-05-11 20:28:14 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-05-11 20:28:14 -0400 |
| commit | e3dd4dc91d65702c085dac9cc4d85aebfa308dfa (patch) | |
| tree | ee8aadf75cd14cd5bf9833b368b2553aae2365a8 /src/glibc.zig | |
| parent | e6881d4373ce355f3f4565c22c125870ed8fcfc8 (diff) | |
| parent | f8cf106fc971c9c61709443860b1f728ca4cfc9a (diff) | |
| download | zig-e3dd4dc91d65702c085dac9cc4d85aebfa308dfa.tar.gz zig-e3dd4dc91d65702c085dac9cc4d85aebfa308dfa.zip | |
Merge pull request #8737 from ifreund/link-system-libc
stage2: use system libc when targeting the native OS/ABI
Diffstat (limited to 'src/glibc.zig')
| -rw-r--r-- | src/glibc.zig | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/glibc.zig b/src/glibc.zig index 7600f19503..6b288ac46d 100644 --- a/src/glibc.zig +++ b/src/glibc.zig @@ -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); |
