diff options
| author | Antoni Boucher <bouanto@zoho.com> | 2025-01-10 12:05:37 -0500 |
|---|---|---|
| committer | Antoni Boucher <bouanto@zoho.com> | 2025-01-11 21:03:58 -0500 |
| commit | 3e4df68991544276099759b754c021f11bd525fe (patch) | |
| tree | 4097e9fdae6374182de94adc68cfe75be7f61d8d | |
| parent | 93693a52dc1b92e6220dde1cb8cb4d4e0a846983 (diff) | |
| download | rust-3e4df68991544276099759b754c021f11bd525fe.tar.gz rust-3e4df68991544276099759b754c021f11bd525fe.zip | |
Fix for m68k
| -rw-r--r-- | src/back/write.rs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/back/write.rs b/src/back/write.rs index 1f4eab28574..37a59e51c4b 100644 --- a/src/back/write.rs +++ b/src/back/write.rs @@ -111,9 +111,12 @@ pub(crate) unsafe fn codegen( // TODO(antoyo): maybe we should call embed_bitcode to have the proper iOS fixes? //embed_bitcode(cgcx, llcx, llmod, &config.bc_cmdline, data); - context.add_command_line_option("-flto=auto"); - context.add_command_line_option("-flto-partition=one"); - context.add_command_line_option("-ffat-lto-objects"); + // TODO: check if this condition makes sense. + if fat_lto { + context.add_command_line_option("-flto=auto"); + context.add_command_line_option("-flto-partition=one"); + context.add_command_line_option("-ffat-lto-objects"); + } // TODO(antoyo): Send -plugin/usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/liblto_plugin.so to linker (this should be done when specifying the appropriate rustc cli argument). context.compile_to_file( OutputKind::ObjectFile, |
