builtin: enable panic handler on self-hosted macho

comp: toggle compiler-rt and zig-libc caps for macho
This commit is contained in:
Jakub Konka 2024-02-08 22:55:11 +01:00
parent 7fb9df3fab
commit 32386a06ca
2 changed files with 3 additions and 3 deletions

View File

@ -765,7 +765,7 @@ pub fn default_panic(msg: []const u8, error_return_trace: ?*StackTrace, ret_addr
builtin.zig_backend == .stage2_arm or
builtin.zig_backend == .stage2_aarch64 or
builtin.zig_backend == .stage2_x86 or
(builtin.zig_backend == .stage2_x86_64 and builtin.target.ofmt != .elf) or
(builtin.zig_backend == .stage2_x86_64 and (builtin.target.ofmt != .elf and builtin.target.ofmt != .macho)) or
builtin.zig_backend == .stage2_riscv64 or
builtin.zig_backend == .stage2_sparc64 or
builtin.zig_backend == .stage2_spirv64)

View File

@ -6280,7 +6280,7 @@ fn canBuildLibCompilerRt(target: std.Target, use_llvm: bool) bool {
}
return switch (target_util.zigBackend(target, use_llvm)) {
.stage2_llvm => true,
.stage2_x86_64 => if (target.ofmt == .elf) true else build_options.have_llvm,
.stage2_x86_64 => if (target.ofmt == .elf or target.ofmt == .macho) true else build_options.have_llvm,
else => build_options.have_llvm,
};
}
@ -6298,7 +6298,7 @@ fn canBuildZigLibC(target: std.Target, use_llvm: bool) bool {
}
return switch (target_util.zigBackend(target, use_llvm)) {
.stage2_llvm => true,
.stage2_x86_64 => if (target.ofmt == .elf) true else build_options.have_llvm,
.stage2_x86_64 => if (target.ofmt == .elf or target.ofmt == .macho) true else build_options.have_llvm,
else => build_options.have_llvm,
};
}