mirror of
https://codeberg.org/ziglang/zig.git
synced 2026-04-26 13:01:34 +03:00
test: reinstate compiler-rt and zigc tests with different LLVM bug workarounds
ref https://codeberg.org/ziglang/zig/issues/31701 ref https://codeberg.org/ziglang/zig/issues/31702
This commit is contained in:
+8
-14
@@ -2523,19 +2523,6 @@ pub fn addModuleTests(b: *std.Build, options: ModuleTestOptions) *Step {
|
||||
const would_use_llvm = wouldUseLlvm(test_target.use_llvm, test_target.target, test_target.optimize_mode);
|
||||
if (options.skip_llvm and would_use_llvm) continue;
|
||||
|
||||
if (would_use_llvm and (mem.eql(u8, options.name, "compiler-rt") or mem.eql(u8, options.name, "zigc"))) {
|
||||
switch (test_target.optimize_mode) {
|
||||
.Debug, .ReleaseSafe => {
|
||||
// LLVM 21 is affected by multiple bugs in safe builds of compiler-rt:
|
||||
// * https://codeberg.org/ziglang/zig/issues/31701
|
||||
// * https://codeberg.org/ziglang/zig/issues/31702
|
||||
// ...so for now, skip these tests.
|
||||
continue;
|
||||
},
|
||||
.ReleaseSmall, .ReleaseFast => {},
|
||||
}
|
||||
}
|
||||
|
||||
const triple_txt = resolved_target.query.zigTriple(b.allocator) catch @panic("OOM");
|
||||
|
||||
if (options.test_target_filters.len > 0) {
|
||||
@@ -2610,7 +2597,14 @@ fn addOneModuleTest(
|
||||
.zig_lib_dir = b.path("lib"),
|
||||
});
|
||||
these_tests.linkage = test_target.linkage;
|
||||
if (options.no_builtin) these_tests.root_module.no_builtin = true;
|
||||
// https://codeberg.org/ziglang/zig/issues/31701
|
||||
if (!(mem.eql(u8, options.name, "compiler-rt") or mem.eql(u8, options.name, "zigc"))) {
|
||||
if (options.no_builtin) these_tests.root_module.no_builtin = true;
|
||||
}
|
||||
// https://codeberg.org/ziglang/zig/issues/31702
|
||||
if (mem.eql(u8, options.name, "compiler-rt") or mem.eql(u8, options.name, "zigc")) {
|
||||
these_tests.root_module.stack_protector = false;
|
||||
}
|
||||
if (options.build_options) |build_options| {
|
||||
these_tests.root_module.addOptions("build_options", build_options);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user