Skip to content

Commit 76c02af

Browse files
committed
Remove dependency on GCC's LTO linker plugin, since Rust does its' own LTO.
1 parent 9f6d27c commit 76c02af

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/librustc/back/link.rs

+3
Original file line numberDiff line numberDiff line change
@@ -929,6 +929,9 @@ fn link_args(cmd: &mut Command,
929929
cmd.arg("-nodefaultlibs");
930930
}
931931

932+
// Rust does its' own LTO
933+
cmd.arg("-fno-lto").arg("-fno-use-linker-plugin");
934+
932935
// If we're building a dylib, we don't use --gc-sections because LLVM has
933936
// already done the best it can do, and we also don't want to eliminate the
934937
// metadata. If we're building an executable, however, --gc-sections drops

0 commit comments

Comments
 (0)