nixpkgs/pkgs/development/compilers/rust/hardcode_paths.patch
2014-05-12 13:37:38 -04:00

42 lines
1.2 KiB
Diff

diff --git a/src/librustc/back/link.rs b/src/librustc/back/link.rs
index f198a41..3a47e51 100644
--- a/src/librustc/back/link.rs
+++ b/src/librustc/back/link.rs
@@ -730,7 +730,7 @@ pub fn get_cc_prog(sess: &Session) -> ~str {
_ => {},
}
- get_system_tool(sess, "cc")
+ ~"@gccPath@"
}
pub fn get_ar_prog(sess: &Session) -> ~str {
@@ -739,26 +739,7 @@ pub fn get_ar_prog(sess: &Session) -> ~str {
None => {}
}
- get_system_tool(sess, "ar")
-}
-
-fn get_system_tool(sess: &Session, tool: &str) -> ~str {
- match sess.targ_cfg.os {
- abi::OsAndroid => match sess.opts.cg.android_cross_path {
- Some(ref path) => {
- let tool_str = match tool {
- "cc" => "gcc",
- _ => tool
- };
- format!("{}/bin/arm-linux-androideabi-{}", *path, tool_str)
- }
- None => {
- sess.fatal(format!("need Android NDK path for the '{}' tool \
- (-C android-cross-path)", tool))
- }
- },
- _ => tool.to_owned(),
- }
+ ~"@binutilsPath@"
}
fn remove(sess: &Session, path: &Path) {