mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-06 13:54:21 +00:00
llvm: disable LTO on C ABI tests
This required disabling some failing tests. See #14908
This commit is contained in:
parent
f821543e4b
commit
a707f380a5
3 changed files with 20 additions and 6 deletions
|
|
@ -20,6 +20,11 @@ static void assert_or_panic(bool ok) {
|
||||||
# define ZIG_RISCV32
|
# define ZIG_RISCV32
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(__aarch64__) && defined(__linux__)
|
||||||
|
// TODO: https://github.com/ziglang/zig/issues/14908
|
||||||
|
#define ZIG_BUG_14908
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef __i386__
|
#ifdef __i386__
|
||||||
# define ZIG_NO_I128
|
# define ZIG_NO_I128
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -263,8 +268,10 @@ void run_c_tests(void) {
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef ZIG_BUG_14908
|
||||||
zig_i8(-1);
|
zig_i8(-1);
|
||||||
zig_i16(-2);
|
zig_i16(-2);
|
||||||
|
#endif
|
||||||
zig_i32(-3);
|
zig_i32(-3);
|
||||||
zig_i64(-4);
|
zig_i64(-4);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -813,6 +813,11 @@ extern fn c_ret_medium_vec() MediumVec;
|
||||||
test "medium simd vector" {
|
test "medium simd vector" {
|
||||||
if (comptime builtin.cpu.arch.isPPC64()) return error.SkipZigTest;
|
if (comptime builtin.cpu.arch.isPPC64()) return error.SkipZigTest;
|
||||||
|
|
||||||
|
if (builtin.cpu.arch == .x86_64 and builtin.os.tag == .linux) {
|
||||||
|
// TODO: https://github.com/ziglang/zig/issues/14908
|
||||||
|
return error.SkipZigTest;
|
||||||
|
}
|
||||||
|
|
||||||
c_medium_vec(.{ 1, 2, 3, 4 });
|
c_medium_vec(.{ 1, 2, 3, 4 });
|
||||||
|
|
||||||
var x = c_ret_medium_vec();
|
var x = c_ret_medium_vec();
|
||||||
|
|
@ -832,6 +837,11 @@ test "big simd vector" {
|
||||||
if (comptime builtin.cpu.arch.isPPC64()) return error.SkipZigTest;
|
if (comptime builtin.cpu.arch.isPPC64()) return error.SkipZigTest;
|
||||||
if (builtin.cpu.arch == .x86_64 and builtin.os.tag == .macos and builtin.mode != .Debug) return error.SkipZigTest;
|
if (builtin.cpu.arch == .x86_64 and builtin.os.tag == .macos and builtin.mode != .Debug) return error.SkipZigTest;
|
||||||
|
|
||||||
|
if (builtin.cpu.arch == .x86_64 and builtin.os.tag == .linux) {
|
||||||
|
// TODO: https://github.com/ziglang/zig/issues/14908
|
||||||
|
return error.SkipZigTest;
|
||||||
|
}
|
||||||
|
|
||||||
c_big_vec(.{ 1, 2, 3, 4, 5, 6, 7, 8 });
|
c_big_vec(.{ 1, 2, 3, 4, 5, 6, 7, 8 });
|
||||||
|
|
||||||
var x = c_ret_big_vec();
|
var x = c_ret_big_vec();
|
||||||
|
|
|
||||||
|
|
@ -1133,12 +1133,9 @@ pub fn addCAbiTests(b: *std.Build, skip_non_native: bool, skip_release: bool) *S
|
||||||
test_step.linkLibC();
|
test_step.linkLibC();
|
||||||
test_step.addCSourceFile("test/c_abi/cfuncs.c", &.{"-std=c99"});
|
test_step.addCSourceFile("test/c_abi/cfuncs.c", &.{"-std=c99"});
|
||||||
|
|
||||||
// test-c-abi should test both with LTO on and with LTO off. Only
|
// This test is intentionally trying to check if the external ABI is
|
||||||
// some combinations are passing currently:
|
// done properly. LTO would be a hindrance to this.
|
||||||
// https://github.com/ziglang/zig/issues/14908
|
|
||||||
if (c_abi_target.isWindows()) {
|
|
||||||
test_step.want_lto = false;
|
test_step.want_lto = false;
|
||||||
}
|
|
||||||
|
|
||||||
const run = b.addRunArtifact(test_step);
|
const run = b.addRunArtifact(test_step);
|
||||||
run.skip_foreign_checks = true;
|
run.skip_foreign_checks = true;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue