| ... | @@ -2,10 +2,7 @@ const std = @import("std"); | ... | @@ -2,10 +2,7 @@ const std = @import("std"); |
| 2 | const builtin = std.builtin; | 2 | const builtin = std.builtin; |
| 3 | const is_test = builtin.is_test; | 3 | const is_test = builtin.is_test; |
| 4 | | 4 | |
| 5 | const is_gnu = switch (builtin.abi) { | 5 | const is_gnu = std.Target.current.abi.isGnu(); |
| 6 | .gnu, .gnuabin32, .gnuabi64, .gnueabi, .gnueabihf, .gnux32 => true, | | |
| 7 | else => false, | | |
| 8 | }; | | |
| 9 | const is_mingw = builtin.os.tag == .windows and is_gnu; | 6 | const is_mingw = builtin.os.tag == .windows and is_gnu; |
| 10 | | 7 | |
| 11 | comptime { | 8 | comptime { |
| ... | @@ -289,7 +286,7 @@ comptime { | ... | @@ -289,7 +286,7 @@ comptime { |
| 289 | else => {}, | 286 | else => {}, |
| 290 | } | 287 | } |
| 291 | } else { | 288 | } else { |
| 292 | if (std.Target.current.isGnuLibC()) { | 289 | if (std.Target.current.isGnuLibC() and builtin.link_libc) { |
| 293 | @export(__stack_chk_guard, .{ .name = "__stack_chk_guard", .linkage = linkage }); | 290 | @export(__stack_chk_guard, .{ .name = "__stack_chk_guard", .linkage = linkage }); |
| 294 | } | 291 | } |
| 295 | @export(@import("compiler_rt/divti3.zig").__divti3, .{ .name = "__divti3", .linkage = linkage }); | 292 | @export(@import("compiler_rt/divti3.zig").__divti3, .{ .name = "__divti3", .linkage = linkage }); |