Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation: Disable LTO for mips n32. #22006

Merged
merged 1 commit into from
Nov 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/Compilation/Config.zig
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,12 @@ pub fn resolve(options: Options) ResolveError!Config {
if (options.lto) |x| break :b x;
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,
else => {},
};

if (target.cpu.arch.isRISCV()) {
// Clang and LLVM currently don't support RISC-V target-abi for LTO.
// Compiling with LTO may fail or produce undesired results.
Expand Down
Loading