diff options
| author | Josh Matthews <josh@joshmatthews.net> | 2013-03-12 00:49:06 -0400 |
|---|---|---|
| committer | Josh Matthews <josh@joshmatthews.net> | 2013-03-12 00:50:19 -0400 |
| commit | 1e1efbf2c355c4ddb1356abe535d79525bad72ba (patch) | |
| tree | 21598ee47ab11bbd2db949148356bb3138e8a43e /src | |
| parent | 48cb9a8ac0b95408a142ea7bc9767414eba2cbb3 (diff) | |
| download | rust-1e1efbf2c355c4ddb1356abe535d79525bad72ba.tar.gz rust-1e1efbf2c355c4ddb1356abe535d79525bad72ba.zip | |
Avoid propagating link_arg values that are unlikely to be resolveable under arbitrary directories.
Diffstat (limited to 'src')
| -rw-r--r-- | src/librustc/back/link.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/librustc/back/link.rs b/src/librustc/back/link.rs index fec3f776681..1437a3af7dd 100644 --- a/src/librustc/back/link.rs +++ b/src/librustc/back/link.rs @@ -818,7 +818,11 @@ pub fn link_binary(sess: Session, do cstore::iter_crate_data(cstore) |crate_num, _| { let link_args = csearch::get_link_args_for_crate(cstore, crate_num); do vec::consume(link_args) |_, link_arg| { - cc_args.push(link_arg); + // Linker arguments that don't begin with - are likely file names, + // so they should not be necessary. + if link_arg.starts_with("-") { + cc_args.push(link_arg); + } } } |
