| ... | @@ -1045,9 +1045,13 @@ pub fn addCAbiTests(b: *std.Build, skip_non_native: bool, skip_release: bool) *S | ... | @@ -1045,9 +1045,13 @@ pub fn addCAbiTests(b: *std.Build, skip_non_native: bool, skip_release: bool) *S |
| 1045 | } | 1045 | } |
| 1046 | test_step.linkLibC(); | 1046 | test_step.linkLibC(); |
| 1047 | test_step.addCSourceFile("test/c_abi/cfuncs.c", &.{"-std=c99"}); | 1047 | test_step.addCSourceFile("test/c_abi/cfuncs.c", &.{"-std=c99"}); |
| 1048 | // This test is intentionally trying to check if the external ABI is | 1048 | |
| 1049 | // done properly. LTO would be a hindrance to this. | 1049 | // test-c-abi should test both with LTO on and with LTO off. Only |
| 1050 | test_step.want_lto = false; | 1050 | // some combinations are passing currently: |
| | 1051 | // https://github.com/ziglang/zig/issues/14908 |
| | 1052 | if (c_abi_target.isWindows() and (c_abi_target.getCpuArch() == .x86 or builtin.target.os.tag == .linux)) { |
| | 1053 | test_step.want_lto = false; |
| | 1054 | } |
| 1051 | | 1055 | |
| 1052 | const triple_prefix = c_abi_target.zigTriple(b.allocator) catch @panic("OOM"); | 1056 | const triple_prefix = c_abi_target.zigTriple(b.allocator) catch @panic("OOM"); |
| 1053 | test_step.setNamePrefix(b.fmt("{s}-{s}-{s} ", .{ | 1057 | test_step.setNamePrefix(b.fmt("{s}-{s}-{s} ", .{ |