Compilation: Work around llvm/llvm-project#105972 by defining the macros.

https://github.com/llvm/llvm-project/issues/105972
This commit is contained in:
Alex Rønne Petersen 2024-08-25 06:57:18 +02:00
parent 77c8f4b671
commit f9455511fa
No known key found for this signature in database

View File

@ -5765,6 +5765,13 @@ pub fn addCCArgs(
try argv.append("-mno-implicit-float");
}
// https://github.com/llvm/llvm-project/issues/105972
if (target.cpu.arch.isPowerPC() and target.floatAbi() == .soft) {
try argv.append("-D__NO_FPRS__");
try argv.append("-D_SOFT_FLOAT");
try argv.append("-D_SOFT_DOUBLE");
}
if (out_dep_path) |p| {
try argv.appendSlice(&[_][]const u8{ "-MD", "-MV", "-MF", p });
}