From 3d9a346aa3ed6fc30e34bd7124e20e77c66cbcb0 Mon Sep 17 00:00:00 2001 From: Vadim Chugunov Date: Sat, 8 Nov 2014 18:32:15 -0800 Subject: [PATCH] As of 4.9.2, gcc started passing -fno-lto to collect2, or to ld if collect2 cannot be found. The latter is the case for our bundles, because we don't include collect2. Unfortunately, ld does not understand this option and errors out. On the bright side, -fno-use-linker-plugin still works to suppress gcc's LTO, so we can drop -fno-lto. --- src/librustc/back/link.rs | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/librustc/back/link.rs b/src/librustc/back/link.rs index 58266f2ea322..f88feb945804 100644 --- a/src/librustc/back/link.rs +++ b/src/librustc/back/link.rs @@ -890,9 +890,6 @@ fn link_args(cmd: &mut Command, cmd.arg(obj_filename.with_extension("metadata.o")); } - // Rust does its' own LTO - cmd.arg("-fno-lto"); - if t.options.is_like_osx { // The dead_strip option to the linker specifies that functions and data // unreachable by the entry point will be removed. This is quite useful