From 0016c62faef0337e5c253bd69644c892baa01059 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20R=C3=B8nne=20Petersen?= Date: Mon, 18 Nov 2024 14:42:53 +0100 Subject: [PATCH] Compilation: Disable LTO for all ILP32-on-LP64 ABIs. Extension of 3a6a8b8aa540413d099a6f41a0d8f882f22acb45 to all similar ABIs. The LLD issue affects them all. --- src/Compilation/Config.zig | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/Compilation/Config.zig b/src/Compilation/Config.zig index a397cf521dda..d125cd8f82a1 100644 --- a/src/Compilation/Config.zig +++ b/src/Compilation/Config.zig @@ -295,10 +295,16 @@ pub fn resolve(options: Options) ResolveError!Config { if (!options.any_c_source_files) break :b false; // https://github.com/llvm/llvm-project/pull/116537 - if (target.cpu.arch.isMIPS64()) switch (target.abi) { - .gnuabin32, .muslabin32 => break :b false, + switch (target.abi) { + .gnuabin32, + .gnuilp32, + .gnux32, + .ilp32, + .muslabin32, + .muslx32, + => break :b false, else => {}, - }; + } if (target.cpu.arch.isRISCV()) { // Clang and LLVM currently don't support RISC-V target-abi for LTO.