authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2024-11-17 10:52:40+01:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2024-11-17 15:15:59+01:00
log3a6a8b8aa540413d099a6f41a0d8f882f22acb45
tree165777697012a8109e33e2b59cfbdc52d436624d
parent7266d4497e7879491c4394bb01e3057d75823cea

Compilation: Disable LTO for mips n32.

See: https://github.com/llvm/llvm-project/pull/116537

1 files changed, 6 insertions(+), 0 deletions(-)

src/Compilation/Config.zig+6
...@@ -294,6 +294,12 @@ pub fn resolve(options: Options) ResolveError!Config {...@@ -294,6 +294,12 @@ pub fn resolve(options: Options) ResolveError!Config {
294 if (options.lto) |x| break :b x;294 if (options.lto) |x| break :b x;
295 if (!options.any_c_source_files) break :b false;295 if (!options.any_c_source_files) break :b false;
296296
297 // https://github.com/llvm/llvm-project/pull/116537
298 if (target.cpu.arch.isMIPS64()) switch (target.abi) {
299 .gnuabin32, .muslabin32 => break :b false,
300 else => {},
301 };
302
297 if (target.cpu.arch.isRISCV()) {303 if (target.cpu.arch.isRISCV()) {
298 // Clang and LLVM currently don't support RISC-V target-abi for LTO.304 // Clang and LLVM currently don't support RISC-V target-abi for LTO.
299 // Compiling with LTO may fail or produce undesired results.305 // Compiling with LTO may fail or produce undesired results.