Skip to content

Commit

Permalink
Avoid propagating link_arg values that are unlikely to be resolveable…
Browse files Browse the repository at this point in the history
… under arbitrary directories.
  • Loading branch information
jdm committed Mar 12, 2013
1 parent 48cb9a8 commit 1e1efbf
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/librustc/back/link.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
}

Expand Down

5 comments on commit 1e1efbf

@bors
Copy link
Contributor

@bors bors commented on 1e1efbf Mar 12, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

saw approval from graydon
at jdm@1e1efbf

@bors
Copy link
Contributor

@bors bors commented on 1e1efbf Mar 12, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging jdm/rust/transitivelink = 1e1efbf into auto

@bors
Copy link
Contributor

@bors bors commented on 1e1efbf Mar 12, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

jdm/rust/transitivelink = 1e1efbf merged ok, testing candidate = ece0986

@bors
Copy link
Contributor

@bors bors commented on 1e1efbf Mar 12, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bors
Copy link
Contributor

@bors bors commented on 1e1efbf Mar 12, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fast-forwarding incoming to auto = ece0986

Please sign in to comment.