Skip to content

Commit ece0986

Browse files
committed
auto merge of #5332 : jdm/rust/transitivelink, r=graydon
The original change bit Servo because rust-harfbuzz includes libharfbuzz.a in its link_args. This works fine in the rust-harfbuzz subdirectory where the static library resides, but when this is propagated to servo_gfx, the lirbrary can no longer be found since it's a relative path.
2 parents a9643d3 + 1e1efbf commit ece0986

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/librustc/back/link.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -818,7 +818,11 @@ pub fn link_binary(sess: Session,
818818
do cstore::iter_crate_data(cstore) |crate_num, _| {
819819
let link_args = csearch::get_link_args_for_crate(cstore, crate_num);
820820
do vec::consume(link_args) |_, link_arg| {
821-
cc_args.push(link_arg);
821+
// 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+
}
822826
}
823827
}
824828

0 commit comments

Comments
 (0)