@@ -387,8 +387,8 @@ pub mod write {
387
387
fmt ! ( "%s/bin/arm-linux-androideabi-gcc" , path)
388
388
}
389
389
& None => {
390
- sess. fatal ( ~ "need Android NDK path for building \
391
- ( --android-cross-path) ")
390
+ sess. fatal ( "need Android NDK path for building \
391
+ (--android-cross-path)")
392
392
}
393
393
} ;
394
394
let mut cc_args = ~[ ] ;
@@ -403,7 +403,7 @@ pub mod write {
403
403
sess. err ( fmt ! ( "building with `%s` failed with code %d" ,
404
404
cc_prog, prog. status) ) ;
405
405
sess. note ( fmt ! ( "%s arguments: %s" ,
406
- cc_prog, str :: connect( cc_args, ~ " ")));
406
+ cc_prog, str :: connect( cc_args, " " ) ) ) ;
407
407
sess. note ( prog. err + prog. out ) ;
408
408
sess. abort_if_errors ( ) ;
409
409
}
@@ -566,7 +566,7 @@ pub fn build_link_meta(sess: Session,
566
566
|| fmt ! ( "output file name `%s` doesn't\
567
567
appear to have a stem",
568
568
output. to_str( ) ) ) . to_managed ( ) ;
569
- warn_missing(sess, ~ " name", name);
569
+ warn_missing ( sess, "name" , name) ;
570
570
name
571
571
}
572
572
} ;
@@ -577,7 +577,7 @@ pub fn build_link_meta(sess: Session,
577
577
Some ( v) => v,
578
578
None => {
579
579
let vers = @"0.0 ";
580
- warn_missing(sess, ~ " vers", vers);
580
+ warn_missing ( sess, "vers" , vers) ;
581
581
vers
582
582
}
583
583
} ;
@@ -618,9 +618,9 @@ pub fn symbol_hash(tcx: ty::ctxt,
618
618
619
619
symbol_hasher. reset ( ) ;
620
620
write_string ( symbol_hasher, link_meta. name ) ;
621
- write_string(symbol_hasher, ~ " -");
621
+ write_string ( symbol_hasher, "-" ) ;
622
622
write_string ( symbol_hasher, link_meta. extras_hash ) ;
623
- write_string(symbol_hasher, ~ " -");
623
+ write_string ( symbol_hasher, "-" ) ;
624
624
write_string ( symbol_hasher, encoder:: encoded_ty ( tcx, t) ) ;
625
625
let mut hash = truncated_hash_result ( symbol_hasher) ;
626
626
// Prefix with _ so that it never blends into adjacent digits
@@ -770,8 +770,8 @@ pub fn link_binary(sess: Session,
770
770
fmt ! ( "%s/bin/arm-linux-androideabi-gcc" , path)
771
771
}
772
772
& None => {
773
- sess.fatal(~ " need Android NDK path for linking \
774
- ( --android-cross-path) ")
773
+ sess. fatal ( "need Android NDK path for linking \
774
+ (--android-cross-path)")
775
775
}
776
776
}
777
777
} else if sess. targ_cfg . os == session:: os_win32 {
@@ -798,21 +798,21 @@ pub fn link_binary(sess: Session,
798
798
799
799
debug ! ( "output: %s" , output. to_str( ) ) ;
800
800
let cc_args = link_args ( sess, obj_filename, out_filename, lm) ;
801
- debug!(" %s link args: %s", cc_prog, str::connect(cc_args, ~ " "));
801
+ debug ! ( "%s link args: %s" , cc_prog, str :: connect( cc_args, " " ) ) ;
802
802
// We run 'cc' here
803
803
let prog = run:: program_output ( cc_prog, cc_args) ;
804
804
if 0 != prog. status {
805
805
sess. err ( fmt ! ( "linking with `%s` failed with code %d" ,
806
806
cc_prog, prog. status) ) ;
807
807
sess. note ( fmt ! ( "%s arguments: %s" ,
808
- cc_prog, str::connect(cc_args, ~ " ")));
808
+ cc_prog, str :: connect( cc_args, " " ) ) ) ;
809
809
sess. note ( prog. err + prog. out ) ;
810
810
sess. abort_if_errors ( ) ;
811
811
}
812
812
813
813
// Clean up on Darwin
814
814
if sess. targ_cfg . os == session:: os_macos {
815
- run::run_program(~ " dsymutil", ~ [output.to_str()]);
815
+ run:: run_program ( "dsymutil" , [ output. to_str ( ) ] ) ;
816
816
}
817
817
818
818
// Remove the temporary object file if we aren't saving temps
@@ -920,27 +920,26 @@ pub fn link_args(sess: Session,
920
920
// On linux librt and libdl are an indirect dependencies via rustrt,
921
921
// and binutils 2.22+ won't add them automatically
922
922
if sess.targ_cfg.os == session::os_linux {
923
- args. push_all( ~ [ ~"-lrt", ~"-ldl"] ) ;
923
+ args.push_all([~" -lrt", ~"-ldl"] ) ;
924
924
925
925
// LLVM implements the `frem` instruction as a call to `fmod`,
926
926
// which lives in libm. Similar to above, on some linuxes we
927
927
// have to be explicit about linking to it. See #2510
928
928
args. push ( ~"-lm") ;
929
929
}
930
930
else if sess. targ_cfg . os == session:: os_android {
931
- args. push_all( ~[ ~"-ldl", ~"-llog", ~"-lsupc++",
932
- ~"-lgnustl_shared"] ) ;
931
+ args. push_all ( [ ~"-ldl", ~"-llog", ~"-lsupc++", ~" -lgnustl_shared"] ) ;
933
932
args. push ( ~"-lm") ;
934
933
}
935
934
936
935
if sess. targ_cfg . os == session:: os_freebsd {
937
- args. push_all( ~ [ ~"-pthread", ~"-lrt",
938
- ~"-L /usr/local/lib", ~"-lexecinfo",
939
- ~"-L /usr/local/lib/gcc46",
940
- ~"-L /usr/local/lib/gcc44", ~"-lstdc++",
941
- ~"-Wl , -z, origin",
942
- ~"-Wl , -rpath, /usr/local/lib/gcc46",
943
- ~"-Wl , -rpath, /usr/local/lib/gcc44"] ) ;
936
+ args. push_all ( [ ~"-pthread", ~"-lrt",
937
+ ~"-L /usr/local/lib", ~"-lexecinfo",
938
+ ~"-L /usr/local/lib/gcc46",
939
+ ~"-L /usr/local/lib/gcc44", ~"-lstdc++",
940
+ ~" -Wl , -z, origin",
941
+ ~"-Wl , -rpath, /usr/local/lib/gcc46",
942
+ ~"-Wl , -rpath, /usr/local/lib/gcc44"] ) ;
944
943
}
945
944
946
945
// OS X 10.6 introduced 'compact unwind info', which is produced by the
0 commit comments