Skip to content

Commit 3d9a346

Browse files
committed
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.
1 parent 6ee56c9 commit 3d9a346

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

src/librustc/back/link.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -890,9 +890,6 @@ fn link_args(cmd: &mut Command,
890890
cmd.arg(obj_filename.with_extension("metadata.o"));
891891
}
892892

893-
// Rust does its' own LTO
894-
cmd.arg("-fno-lto");
895-
896893
if t.options.is_like_osx {
897894
// The dead_strip option to the linker specifies that functions and data
898895
// unreachable by the entry point will be removed. This is quite useful

0 commit comments

Comments
 (0)