compiler: don't use self-hosted backend on any BSD yet

There are some blocking bugs in the self-hosted ELF linker.
This commit is contained in:
alexrp
2025-09-21 08:47:21 +02:00
committed by Alex Rønne Petersen
parent 0e673fdab2
commit e526d65f5e
3 changed files with 4 additions and 3 deletions

View File

@@ -44,7 +44,7 @@ fn addCaseInner(self: *StackTrace, config: Config, use_llvm: bool) void {
fn shouldTestNonLlvm(target: *const std.Target) bool {
return switch (target.cpu.arch) {
.x86_64 => switch (target.ofmt) {
.elf => true,
.elf => !target.os.tag.isBSD(),
else => false,
},
else => false,

View File

@@ -2488,8 +2488,9 @@ pub fn wouldUseLlvm(use_llvm: ?bool, query: std.Target.Query, optimize_mode: Opt
else => return true,
}
const cpu_arch = query.cpu_arch orelse builtin.cpu.arch;
const os_tag = query.os_tag orelse builtin.os.tag;
switch (cpu_arch) {
.x86_64 => if (std.Target.ptrBitWidth_arch_abi(cpu_arch, query.abi orelse .none) != 64) return true,
.x86_64 => if (os_tag.isBSD() or std.Target.ptrBitWidth_arch_abi(cpu_arch, query.abi orelse .none) != 64) return true,
.spirv32, .spirv64 => return false,
else => return true,
}