2014-01-20 16:05:29 +00:00
|
|
|
diff --git a/src/librustc/back/link.rs b/src/librustc/back/link.rs
|
2014-10-16 21:24:33 +01:00
|
|
|
index 1cc60fc..2e94b99 100644
|
2014-01-20 16:05:29 +00:00
|
|
|
--- a/src/librustc/back/link.rs
|
|
|
|
+++ b/src/librustc/back/link.rs
|
2014-10-16 21:24:33 +01:00
|
|
|
@@ -383,18 +383,9 @@ pub fn mangle_internal_name_by_path_and_seq(path: PathElems, flav: &str) -> Stri
|
2014-01-20 16:05:29 +00:00
|
|
|
|
2014-07-02 20:43:34 +01:00
|
|
|
pub fn get_cc_prog(sess: &Session) -> String {
|
|
|
|
match sess.opts.cg.linker {
|
|
|
|
- Some(ref linker) => return linker.to_string(),
|
|
|
|
- None => {}
|
|
|
|
+ Some(ref linker) => linker.to_string(),
|
|
|
|
+ None => "@ccPath@".to_string()
|
2014-01-20 16:05:29 +00:00
|
|
|
}
|
2014-04-25 21:40:51 +01:00
|
|
|
-
|
2014-07-02 20:43:34 +01:00
|
|
|
- // In the future, FreeBSD will use clang as default compiler.
|
|
|
|
- // It would be flexible to use cc (system's default C compiler)
|
|
|
|
- // instead of hard-coded gcc.
|
2014-10-16 21:24:33 +01:00
|
|
|
- // For Windows, there is no cc command, so we add a condition to make it use gcc.
|
2014-01-20 16:05:29 +00:00
|
|
|
- match sess.targ_cfg.os {
|
2014-10-16 21:24:33 +01:00
|
|
|
- abi::OsWindows => "gcc",
|
2014-07-02 20:43:34 +01:00
|
|
|
- _ => "cc",
|
|
|
|
- }.to_string()
|
|
|
|
}
|
|
|
|
|
2014-10-16 21:24:33 +01:00
|
|
|
pub fn remove(sess: &Session, path: &Path) {
|
|
|
|
diff --git a/src/librustc_back/archive.rs b/src/librustc_back/archive.rs
|
|
|
|
index 060dda5..fecf76b 100644
|
|
|
|
--- a/src/librustc_back/archive.rs
|
|
|
|
+++ b/src/librustc_back/archive.rs
|
|
|
|
@@ -53,7 +53,7 @@ fn run_ar(handler: &ErrorHandler, maybe_ar_prog: &Option<String>,
|
|
|
|
paths: &[&Path]) -> ProcessOutput {
|
|
|
|
let ar = match *maybe_ar_prog {
|
|
|
|
Some(ref ar) => ar.as_slice(),
|
|
|
|
- None => "ar"
|
|
|
|
+ None => "@arPath@"
|
|
|
|
};
|
|
|
|
let mut cmd = Command::new(ar);
|