From 76c02af434a7447824b3c0c105c4af57d3d6c50e Mon Sep 17 00:00:00 2001 From: Vadim Chugunov Date: Wed, 3 Sep 2014 00:41:53 -0700 Subject: [PATCH] Remove dependency on GCC's LTO linker plugin, since Rust does its' own LTO. --- src/librustc/back/link.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/librustc/back/link.rs b/src/librustc/back/link.rs index bf026560c6a..e418284ffce 100644 --- a/src/librustc/back/link.rs +++ b/src/librustc/back/link.rs @@ -929,6 +929,9 @@ fn link_args(cmd: &mut Command, cmd.arg("-nodefaultlibs"); } + // Rust does its' own LTO + cmd.arg("-fno-lto").arg("-fno-use-linker-plugin"); + // If we're building a dylib, we don't use --gc-sections because LLVM has // already done the best it can do, and we also don't want to eliminate the // metadata. If we're building an executable, however, --gc-sections drops