authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2023-07-25 21:09:17-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2023-07-26 11:07:11-07:00
loga707f380a5f54b70ee7664708d83c9002de6644d
treefc8a7aa3b0c50566c50360256d590539bbf72439
parentf821543e4b5e44b2ca3217c189272105fc3effb9

llvm: disable LTO on C ABI tests

This required disabling some failing tests. See #14908

3 files changed, 20 insertions(+), 6 deletions(-)

test/c_abi/cfuncs.c+7
......@@ -20,6 +20,11 @@ static void assert_or_panic(bool ok) {
2020# define ZIG_RISCV32
2121#endif
2222
23#if defined(__aarch64__) && defined(__linux__)
24// TODO: https://github.com/ziglang/zig/issues/14908
25#define ZIG_BUG_14908
26#endif
27
2328#ifdef __i386__
2429# define ZIG_NO_I128
2530#endif
......@@ -263,8 +268,10 @@ void run_c_tests(void) {
263268 }
264269#endif
265270
271#ifndef ZIG_BUG_14908
266272 zig_i8(-1);
267273 zig_i16(-2);
274#endif
268275 zig_i32(-3);
269276 zig_i64(-4);
270277
test/c_abi/main.zig+10
......@@ -813,6 +813,11 @@ extern fn c_ret_medium_vec() MediumVec;
813813test "medium simd vector" {
814814 if (comptime builtin.cpu.arch.isPPC64()) return error.SkipZigTest;
815815
816 if (builtin.cpu.arch == .x86_64 and builtin.os.tag == .linux) {
817 // TODO: https://github.com/ziglang/zig/issues/14908
818 return error.SkipZigTest;
819 }
820
816821 c_medium_vec(.{ 1, 2, 3, 4 });
817822
818823 var x = c_ret_medium_vec();
......@@ -832,6 +837,11 @@ test "big simd vector" {
832837 if (comptime builtin.cpu.arch.isPPC64()) return error.SkipZigTest;
833838 if (builtin.cpu.arch == .x86_64 and builtin.os.tag == .macos and builtin.mode != .Debug) return error.SkipZigTest;
834839
840 if (builtin.cpu.arch == .x86_64 and builtin.os.tag == .linux) {
841 // TODO: https://github.com/ziglang/zig/issues/14908
842 return error.SkipZigTest;
843 }
844
835845 c_big_vec(.{ 1, 2, 3, 4, 5, 6, 7, 8 });
836846
837847 var x = c_ret_big_vec();
test/tests.zig+3-6
......@@ -1133,12 +1133,9 @@ pub fn addCAbiTests(b: *std.Build, skip_non_native: bool, skip_release: bool) *S
11331133 test_step.linkLibC();
11341134 test_step.addCSourceFile("test/c_abi/cfuncs.c", &.{"-std=c99"});
11351135
1136 // test-c-abi should test both with LTO on and with LTO off. Only
1137 // some combinations are passing currently:
1138 // https://github.com/ziglang/zig/issues/14908
1139 if (c_abi_target.isWindows()) {
1140 test_step.want_lto = false;
1141 }
1136 // This test is intentionally trying to check if the external ABI is
1137 // done properly. LTO would be a hindrance to this.
1138 test_step.want_lto = false;
11421139
11431140 const run = b.addRunArtifact(test_step);
11441141 run.skip_foreign_checks = true;