Skip to content

Commit

Permalink
As of 4.9.2, gcc started passing -fno-lto to collect2, or to ld if co…
Browse files Browse the repository at this point in the history
…llect2 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.
  • Loading branch information
vadimcn committed Nov 9, 2014
1 parent 6ee56c9 commit 3d9a346
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/librustc/back/link.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3d9a346

Please sign in to comment.