mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-06 13:54:21 +00:00
compiler: avoid using self-hosted backend on x86_64-solaris/illumos
https://github.com/ziglang/zig/issues/25699
This commit is contained in:
parent
feb05a716d
commit
e39b82bf4e
4 changed files with 7 additions and 3 deletions
|
|
@ -257,6 +257,10 @@ pub fn hasNewLinkerSupport(ofmt: std.Target.ObjectFormat, backend: std.builtin.C
|
||||||
pub fn selfHostedBackendIsAsRobustAsLlvm(target: *const std.Target) bool {
|
pub fn selfHostedBackendIsAsRobustAsLlvm(target: *const std.Target) bool {
|
||||||
if (target.cpu.arch.isSpirV()) return true;
|
if (target.cpu.arch.isSpirV()) return true;
|
||||||
if (target.cpu.arch == .x86_64 and target.ptrBitWidth() == 64) {
|
if (target.cpu.arch == .x86_64 and target.ptrBitWidth() == 64) {
|
||||||
|
if (target.os.tag.isSolarish()) {
|
||||||
|
// https://github.com/ziglang/zig/issues/25699
|
||||||
|
return false;
|
||||||
|
}
|
||||||
if (target.os.tag.isBSD()) {
|
if (target.os.tag.isBSD()) {
|
||||||
// Self-hosted linker needs work: https://github.com/ziglang/zig/issues/24341
|
// Self-hosted linker needs work: https://github.com/ziglang/zig/issues/24341
|
||||||
return false;
|
return false;
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,7 @@ pub fn addCase(self: *ErrorTrace, case: Case) void {
|
||||||
fn shouldTestNonLlvm(target: *const std.Target) bool {
|
fn shouldTestNonLlvm(target: *const std.Target) bool {
|
||||||
return switch (target.cpu.arch) {
|
return switch (target.cpu.arch) {
|
||||||
.x86_64 => switch (target.ofmt) {
|
.x86_64 => switch (target.ofmt) {
|
||||||
.elf => !target.os.tag.isBSD(),
|
.elf => !target.os.tag.isBSD() and !target.os.tag.isSolarish(),
|
||||||
else => false,
|
else => false,
|
||||||
},
|
},
|
||||||
else => false,
|
else => false,
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,7 @@ fn addCaseTarget(
|
||||||
) void {
|
) void {
|
||||||
const both_backends = switch (target.result.cpu.arch) {
|
const both_backends = switch (target.result.cpu.arch) {
|
||||||
.x86_64 => switch (target.result.ofmt) {
|
.x86_64 => switch (target.result.ofmt) {
|
||||||
.elf => !target.result.os.tag.isBSD(),
|
.elf => !target.result.os.tag.isBSD() and !target.result.os.tag.isSolarish(),
|
||||||
else => false,
|
else => false,
|
||||||
},
|
},
|
||||||
else => false,
|
else => false,
|
||||||
|
|
|
||||||
|
|
@ -2493,7 +2493,7 @@ pub fn wouldUseLlvm(use_llvm: ?bool, query: std.Target.Query, optimize_mode: Opt
|
||||||
const cpu_arch = query.cpu_arch orelse builtin.cpu.arch;
|
const cpu_arch = query.cpu_arch orelse builtin.cpu.arch;
|
||||||
const os_tag = query.os_tag orelse builtin.os.tag;
|
const os_tag = query.os_tag orelse builtin.os.tag;
|
||||||
switch (cpu_arch) {
|
switch (cpu_arch) {
|
||||||
.x86_64 => if (os_tag.isBSD() or std.Target.ptrBitWidth_arch_abi(cpu_arch, query.abi orelse .none) != 64) return true,
|
.x86_64 => if (os_tag.isBSD() or os_tag.isSolarish() or std.Target.ptrBitWidth_arch_abi(cpu_arch, query.abi orelse .none) != 64) return true,
|
||||||
.spirv32, .spirv64 => return false,
|
.spirv32, .spirv64 => return false,
|
||||||
else => return true,
|
else => return true,
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue