We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ce45bb7 commit a8a6188Copy full SHA for a8a6188
src/librustc/back/link.rs
@@ -1099,9 +1099,10 @@ pub fn link_args(sess: Session,
1099
// and binutils 2.22+ won't add them automatically
1100
if sess.targ_cfg.os == abi::OsLinux {
1101
// GNU-style linkers supports optimization with -O. --gc-sections removes metadata and
1102
- // potentially other useful things, so don't include it.
+ // potentially other useful things, so don't include it. GNU ld doesn't need a numeric
1103
+ // argument, but other linkers do.
1104
if sess.opts.optimize == session::Default || sess.opts.optimize == session::Aggressive {
- args.push(~"-Wl,-O");
1105
+ args.push(~"-Wl,-O1");
1106
}
1107
1108
args.push_all([~"-lrt", ~"-ldl"]);
0 commit comments