Skip to content

Commit 6e6eadc

Browse files
committed
---
yaml --- r: 94015 b: refs/heads/try c: 32688f8 h: refs/heads/master i: 94013: 1888f44 94011: 153dde5 94007: 72203f3 93999: 56fbd5b 93983: febed5b 93951: 5e2a65a v: v3
1 parent 87fe054 commit 6e6eadc

File tree

5 files changed

+19
-6
lines changed

5 files changed

+19
-6
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: 0da105a8b7b6b1e0568e8ff20f6ff4b13cc7ecc2
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: a6d3e57dca68fde4effdda3e4ae2887aa535fcd6
5-
refs/heads/try: df41115213e851b9f23dfea3d6782dea5243a5d4
5+
refs/heads/try: 32688f8f7448b131434bbd340e7163ecd6d0e8ac
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c

branches/try/src/librustc/back/link.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -362,12 +362,12 @@ pub mod write {
362362
~"-o", object.as_str().unwrap().to_owned(),
363363
assembly.as_str().unwrap().to_owned()];
364364

365-
debug!("{} {}", cc, args.connect(" "));
365+
debug!("{} '{}'", cc, args.connect("' '"));
366366
let prog = run::process_output(cc, args);
367367

368368
if !prog.status.success() {
369369
sess.err(format!("linking with `{}` failed: {}", cc, prog.status));
370-
sess.note(format!("{} arguments: {}", cc, args.connect(" ")));
370+
sess.note(format!("{} arguments: '{}'", cc, args.connect("' '")));
371371
sess.note(str::from_utf8(prog.error + prog.output));
372372
sess.abort_if_errors();
373373
}
@@ -1061,7 +1061,7 @@ fn link_natively(sess: Session, dylib: bool, obj_filename: &Path,
10611061
let mut cc_args = sess.targ_cfg.target_strs.cc_args.clone();
10621062
cc_args.push_all_move(link_args(sess, dylib, obj_filename, out_filename));
10631063
if (sess.opts.debugging_opts & session::print_link_args) != 0 {
1064-
println!("{} link args: {}", cc_prog, cc_args.connect(" "));
1064+
println!("{} link args: '{}'", cc_prog, cc_args.connect("' '"));
10651065
}
10661066

10671067
// May have not found libraries in the right formats.
@@ -1073,7 +1073,7 @@ fn link_natively(sess: Session, dylib: bool, obj_filename: &Path,
10731073

10741074
if !prog.status.success() {
10751075
sess.err(format!("linking with `{}` failed: {}", cc_prog, prog.status));
1076-
sess.note(format!("{} arguments: {}", cc_prog, cc_args.connect(" ")));
1076+
sess.note(format!("{} arguments: '{}'", cc_prog, cc_args.connect("' '")));
10771077
sess.note(str::from_utf8(prog.error + prog.output));
10781078
sess.abort_if_errors();
10791079
}

branches/try/src/librustc/driver/driver.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -762,7 +762,13 @@ pub fn build_session_options(binary: @str,
762762
let ar = matches.opt_str("ar");
763763
let linker = matches.opt_str("linker");
764764
let linker_args = matches.opt_strs("link-args").flat_map( |a| {
765-
a.split(' ').map(|arg| arg.to_owned()).collect()
765+
a.split(' ').filter_map(|arg| {
766+
if arg.is_empty() {
767+
None
768+
} else {
769+
Some(arg.to_owned())
770+
}
771+
}).collect()
766772
});
767773

768774
let cfg = parse_cfgspecs(matches.opt_strs("cfg"), demitter);
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
-include ../tools.mk
2+
# Notice the space in the end, this emulates the output of pkg-config
3+
RUSTC_FLAGS = --link-args "-lc "
4+
5+
all:
6+
$(RUSTC) $(RUSTC_FLAGS) empty.rs
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
fn main() { }

0 commit comments

Comments
 (0)