commit 941cae4331ff4922ccef08a5d3d5879a0d1fa786 (tree) parent 22d94eaf32bc303ff757f442991f570b264b24c3 Author: Andrew Kelley <andrew@ziglang.org> Date: Mon, 13 Mar 2023 23:41:41 -0700 revert a change to C ABI tests See tracking issue #14908 Diffstat:
| M | test/tests.zig | | | 10 | +++++++--- |
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/test/tests.zig b/test/tests.zig @@ -1045,9 +1045,13 @@ pub fn addCAbiTests(b: *std.Build, skip_non_native: bool, skip_release: bool) *S } test_step.linkLibC(); test_step.addCSourceFile("test/c_abi/cfuncs.c", &.{"-std=c99"}); - // This test is intentionally trying to check if the external ABI is - // done properly. LTO would be a hindrance to this. - test_step.want_lto = false; + + // test-c-abi should test both with LTO on and with LTO off. Only + // some combinations are passing currently: + // https://github.com/ziglang/zig/issues/14908 + if (c_abi_target.isWindows() and (c_abi_target.getCpuArch() == .x86 or builtin.target.os.tag == .linux)) { + test_step.want_lto = false; + } const triple_prefix = c_abi_target.zigTriple(b.allocator) catch @panic("OOM"); test_step.setNamePrefix(b.fmt("{s}-{s}-{s} ", .{