From f9e17e1d336f2988f6cf27db95924dd462f66e0d Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Tue, 8 Apr 2014 10:05:18 -0700 Subject: [PATCH] rustc: Don't rpath to librustrt.dylib This library no longer exists, there's no reason for this rpath to exist any more. --- src/librustc/back/rpath.rs | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/src/librustc/back/rpath.rs b/src/librustc/back/rpath.rs index 73ccc8871ca..4b54b1f6008 100644 --- a/src/librustc/back/rpath.rs +++ b/src/librustc/back/rpath.rs @@ -42,10 +42,9 @@ pub fn get_rpath_flags(sess: &Session, out_filename: &Path) -> Vec<~str> { let sysroot = sess.filesearch().sysroot; let output = out_filename; let libs = sess.cstore.get_used_crates(cstore::RequireDynamic); - let libs = libs.move_iter().filter_map(|(_, l)| l.map(|p| p.clone())).collect(); - // We don't currently rpath extern libraries, but we know - // where rustrt is and we know every rust program needs it - let libs = slice::append_one(libs, get_sysroot_absolute_rt_lib(sess)); + let libs = libs.move_iter().filter_map(|(_, l)| { + l.map(|p| p.clone()) + }).collect::<~[_]>(); let rpaths = get_rpaths(os, sysroot, output, libs, sess.opts.target_triple); @@ -53,14 +52,6 @@ pub fn get_rpath_flags(sess: &Session, out_filename: &Path) -> Vec<~str> { flags } -fn get_sysroot_absolute_rt_lib(sess: &Session) -> Path { - let sysroot = sess.filesearch().sysroot; - let r = filesearch::relative_target_lib_path(sysroot, sess.opts.target_triple); - let mut p = sysroot.join(&r); - p.push(os::dll_filename("rustrt")); - p -} - pub fn rpaths_to_flags(rpaths: &[~str]) -> Vec<~str> { let mut ret = Vec::new(); for rpath in rpaths.iter() {