mirror of
https://github.com/ziglang/zig.git
synced 2026-02-13 21:08:36 +00:00
zig cc: Avoid passing any "CPU" features related to float ABI to Clang.
This commit is contained in:
parent
6667e0fbb4
commit
28469636ba
@ -5921,8 +5921,10 @@ pub fn addCCArgs(
|
||||
const is_enabled = target.cpu.features.isEnabled(index);
|
||||
|
||||
if (feature.llvm_name) |llvm_name| {
|
||||
// We communicate float ABI to Clang through the dedicated options further down.
|
||||
if (std.mem.eql(u8, llvm_name, "soft-float")) continue;
|
||||
// We communicate float ABI to Clang through the dedicated options.
|
||||
if (std.mem.startsWith(u8, llvm_name, "soft-float") or
|
||||
std.mem.startsWith(u8, llvm_name, "hard-float"))
|
||||
continue;
|
||||
|
||||
argv.appendSliceAssumeCapacity(&[_][]const u8{ "-Xclang", "-target-feature", "-Xclang" });
|
||||
const plus_or_minus = "-+"[@intFromBool(is_enabled)];
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user