We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 48cb9a8 commit 1e1efbfCopy full SHA for 1e1efbf
src/librustc/back/link.rs
@@ -818,7 +818,11 @@ pub fn link_binary(sess: Session,
818
do cstore::iter_crate_data(cstore) |crate_num, _| {
819
let link_args = csearch::get_link_args_for_crate(cstore, crate_num);
820
do vec::consume(link_args) |_, link_arg| {
821
- cc_args.push(link_arg);
+ // Linker arguments that don't begin with - are likely file names,
822
+ // so they should not be necessary.
823
+ if link_arg.starts_with("-") {
824
+ cc_args.push(link_arg);
825
+ }
826
}
827
828
0 commit comments