diff --git a/test/c_abi/cfuncs.c b/test/c_abi/cfuncs.c index 4ef3468f51cc12af666c62af28f15826a582ff6a..5e9d192c6ffc83fd4352281742730a6a58712995 100644 --- a/test/c_abi/cfuncs.c +++ b/test/c_abi/cfuncs.c @@ -2846,6 +2846,7 @@ void run_c_tests(void) { #if !defined(__mips64) #if !defined(ZIG_PPC32) #if !defined(__s390x__) +#if !(defined(_WIN32) && defined(__i386__)) { struct Struct_u8 s = zig_ret_struct_u8(); assert_or_panic(s.a == 1); @@ -2854,10 +2855,12 @@ void run_c_tests(void) { #endif #endif #endif +#endif #if !defined(__mips64) #if !defined(ZIG_PPC32) #if !defined(__s390x__) +#if !(defined(_WIN32) && defined(__i386__)) { struct Struct_u16 s = zig_ret_struct_u16(); assert_or_panic(s.a == 7); @@ -2866,10 +2869,12 @@ void run_c_tests(void) { #endif #endif #endif +#endif #if !defined(__mips64) #if !defined(ZIG_PPC32) #if !defined(__s390x__) +#if !(defined(_WIN32) && defined(__i386__)) { struct Struct_u32 s = zig_ret_struct_u32(); assert_or_panic(s.a == 13); @@ -2878,10 +2883,12 @@ void run_c_tests(void) { #endif #endif #endif +#endif #if !defined(ZIG_PPC32) #if !defined(ZIG_RISCV32) #if !defined(__s390x__) +#if !(defined(_WIN32) && defined(__i386__)) { struct Struct_u64 s = zig_ret_struct_u64(); assert_or_panic(s.a == 19); @@ -2890,6 +2897,7 @@ void run_c_tests(void) { #endif #endif #endif +#endif #if !defined(ZIG_PPC32) && !defined(__hexagon__) && !defined(__s390x__) { @@ -2908,15 +2916,18 @@ void run_c_tests(void) { } #if !defined(__mips64__) +#if !(defined(_WIN32) && defined(__i386__)) { struct Struct_f32 s = zig_ret_struct_f32(); assert_or_panic(s.a == 2.5f); zig_struct_f32((struct Struct_f32){ .a = 2.5f }); } #endif +#endif #if !(defined(__arm__) && defined(__SOFTFP__)) #if !defined(ZIG_RISCV32) +#if !(defined(_WIN32) && defined(__i386__)) { struct Struct_f64 s = zig_ret_struct_f64(); assert_or_panic(s.a == 2.5); @@ -2924,6 +2935,7 @@ void run_c_tests(void) { } #endif #endif +#endif #if !defined(__arm__) #if !defined(__loongarch__) @@ -2987,6 +2999,7 @@ void run_c_tests(void) { #endif #if !defined(__powerpc__) && !defined(__loongarch__) && !defined(__mips64__) +#if !(defined(_WIN32) && defined(__i386__)) { struct Struct_u32_Union_u32_u32u32 s = zig_ret_struct_u32_union_u32_u32u32(); assert_or_panic(s.a == 1); @@ -3000,6 +3013,7 @@ void run_c_tests(void) { zig_struct_i32_i32(s); } #endif +#endif #if !defined(__powerpc64__) && !defined(__loongarch__) && !defined(__mips64__) { diff --git a/test/c_abi/main.zig b/test/c_abi/main.zig index b722e4089210a2520c6e67391d32bbb1097050e1..ff6ecbea9a4bd4a318fa8cbbd6cdcca73528b1ce 100644 --- a/test/c_abi/main.zig +++ b/test/c_abi/main.zig @@ -291,6 +291,7 @@ test "C ABI struct u8" { if (builtin.cpu.arch.isMIPS64()) return error.SkipZigTest; if (builtin.cpu.arch.isPowerPC32()) return error.SkipZigTest; if (builtin.cpu.arch == .s390x) return error.SkipZigTest; + if (builtin.cpu.arch == .x86 and builtin.os.tag == .windows) return error.SkipZigTest; const s = c_ret_struct_u8(); try expect(s.a == 4); @@ -318,6 +319,7 @@ test "C ABI struct u16" { if (builtin.cpu.arch.isMIPS64()) return error.SkipZigTest; if (builtin.cpu.arch.isPowerPC32()) return error.SkipZigTest; if (builtin.cpu.arch == .s390x) return error.SkipZigTest; + if (builtin.cpu.arch == .x86 and builtin.os.tag == .windows) return error.SkipZigTest; const s = c_ret_struct_u16(); try expect(s.a == 10); @@ -345,6 +347,7 @@ test "C ABI struct u32" { if (builtin.cpu.arch.isMIPS64()) return error.SkipZigTest; if (builtin.cpu.arch.isPowerPC32()) return error.SkipZigTest; if (builtin.cpu.arch == .s390x) return error.SkipZigTest; + if (builtin.cpu.arch == .x86 and builtin.os.tag == .windows) return error.SkipZigTest; const s = c_ret_struct_u32(); try expect(s.a == 16); @@ -372,6 +375,7 @@ test "C ABI struct u64" { if (builtin.cpu.arch.isPowerPC32()) return error.SkipZigTest; if (builtin.cpu.arch == .riscv32) return error.SkipZigTest; if (builtin.cpu.arch == .s390x) return error.SkipZigTest; + if (builtin.cpu.arch == .x86 and builtin.os.tag == .windows) return error.SkipZigTest; const s = c_ret_struct_u64(); try expect(s.a == 22); @@ -485,6 +489,7 @@ test "C ABI struct f32" { if (builtin.cpu.arch.isMIPS64()) return error.SkipZigTest; if (builtin.cpu.arch.isPowerPC32()) return error.SkipZigTest; if (builtin.cpu.arch == .s390x) return error.SkipZigTest; + if (builtin.cpu.arch == .x86 and builtin.os.tag == .windows) return error.SkipZigTest; const s = c_ret_struct_f32(); try expect(s.a == 2.5); @@ -513,6 +518,7 @@ test "C ABI struct f64" { if (builtin.cpu.arch.isArm() and builtin.abi.float() == .soft) return error.SkipZigTest; if (builtin.cpu.arch == .riscv32) return error.SkipZigTest; if (builtin.cpu.arch == .s390x) return error.SkipZigTest; + if (builtin.cpu.arch == .x86 and builtin.os.tag == .windows) return error.SkipZigTest; const s = c_ret_struct_f64(); try expect(s.a == 2.5); @@ -705,6 +711,7 @@ test "C ABI struct i32 i32" { if (builtin.cpu.arch == .riscv32) return error.SkipZigTest; if (builtin.cpu.arch.isLoongArch()) return error.SkipZigTest; if (builtin.cpu.arch == .s390x) return error.SkipZigTest; + if (builtin.cpu.arch == .x86 and builtin.os.tag == .windows) return error.SkipZigTest; const s: Struct_i32_i32 = .{ .a = 1, @@ -5681,6 +5688,7 @@ test "C ABI pointer sized float struct" { if (builtin.cpu.arch.isArm() and builtin.abi.float() == .soft) return error.SkipZigTest; if (builtin.cpu.arch.isLoongArch() and builtin.abi.float() == .soft) return error.SkipZigTest; if (builtin.cpu.arch == .s390x) return error.SkipZigTest; + if (builtin.cpu.arch == .x86 and builtin.os.tag == .windows) return error.SkipZigTest; c_ptr_size_float_struct(.{ .x = 1, .y = 2 }); @@ -5812,6 +5820,7 @@ test "PD: Zig passes to C" { if (builtin.cpu.arch.isLoongArch()) return error.SkipZigTest; if (builtin.cpu.arch == .hexagon) return error.SkipZigTest; if (builtin.cpu.arch == .s390x) return error.SkipZigTest; + if (builtin.cpu.arch == .x86 and builtin.os.tag == .windows) return error.SkipZigTest; try expectOk(c_assert_PD(.{ .v1 = null, .v2 = 0.5 })); } test "PD: Zig returns to C" { @@ -5827,6 +5836,7 @@ test "PD: C passes to Zig" { if (builtin.cpu.arch.isLoongArch()) return error.SkipZigTest; if (builtin.cpu.arch == .hexagon) return error.SkipZigTest; if (builtin.cpu.arch == .s390x) return error.SkipZigTest; + if (builtin.cpu.arch == .x86 and builtin.os.tag == .windows) return error.SkipZigTest; try expectOk(c_send_PD()); } test "PD: C returns to Zig" { @@ -5936,6 +5946,7 @@ test "f16 struct" { if (builtin.target.cpu.arch.isPowerPC32()) return error.SkipZigTest; if (builtin.cpu.arch.isArm() and builtin.mode != .Debug) return error.SkipZigTest; if (builtin.cpu.arch == .s390x) return error.SkipZigTest; + if (builtin.cpu.arch == .x86 and builtin.os.tag == .windows) return error.SkipZigTest; const a = c_f16_struct(.{ .a = 12 }); try expect(a.a == 34); @@ -6045,6 +6056,7 @@ test "Stdcall ABI structs" { if (builtin.cpu.arch.isLoongArch()) return error.SkipZigTest; if (builtin.cpu.arch == .hexagon) return error.SkipZigTest; if (builtin.cpu.arch == .s390x) return error.SkipZigTest; + if (builtin.cpu.arch == .x86 and builtin.os.tag == .windows) return error.SkipZigTest; const res = stdcall_coord2( .{ .x = 0x1111, .y = 0x2222 }, diff --git a/test/tests.zig b/test/tests.zig index b70e384e72fb38179853c34872ca2c8d0b8cfa0f..2610a54ccd884aa35976335aa5bf0ca974d6f052 100644 --- a/test/tests.zig +++ b/test/tests.zig @@ -1995,14 +1995,13 @@ const c_abi_targets = blk: { // Windows Targets - // https://codeberg.org/ziglang/zig/issues/35521 - //.{ - // .target = .{ - // .cpu_arch = .x86, - // .os_tag = .windows, - // .abi = .gnu, - // }, - //}, + .{ + .target = .{ + .cpu_arch = .x86, + .os_tag = .windows, + .abi = .gnu, + }, + }, .{ .target = .{ .cpu_arch = .x86_64,