Skip to content

Commit 1a56aff

Browse files
committed
Compilation: Disable LTO for mips n32.
See: llvm/llvm-project#116537
1 parent bfcf18c commit 1a56aff

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/Compilation/Config.zig

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,12 @@ pub fn resolve(options: Options) ResolveError!Config {
294294
if (options.lto) |x| break :b x;
295295
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+
297303
if (target.cpu.arch.isRISCV()) {
298304
// Clang and LLVM currently don't support RISC-V target-abi for LTO.
299305
// Compiling with LTO may fail or produce undesired results.

0 commit comments

Comments
 (0)