@@ -87,10 +87,6 @@ fn get_rpaths(os: abi::Os,
87
87
// crates they depend on.
88
88
let rel_rpaths = get_rpaths_relative_to_output ( os, output, libs) ;
89
89
90
- // Make backup absolute paths to the libraries. Binaries can
91
- // be moved as long as the crates they link against don't move.
92
- let abs_rpaths = get_absolute_rpaths ( libs) ;
93
-
94
90
// And a final backup rpath to the global library location.
95
91
let fallback_rpaths = vec ! ( get_install_prefix_rpath( sysroot, target_triple) ) ;
96
92
@@ -102,11 +98,9 @@ fn get_rpaths(os: abi::Os,
102
98
}
103
99
104
100
log_rpaths ( "relative" , rel_rpaths. as_slice ( ) ) ;
105
- log_rpaths ( "absolute" , abs_rpaths. as_slice ( ) ) ;
106
101
log_rpaths ( "fallback" , fallback_rpaths. as_slice ( ) ) ;
107
102
108
103
let mut rpaths = rel_rpaths;
109
- rpaths. push_all ( abs_rpaths. as_slice ( ) ) ;
110
104
rpaths. push_all ( fallback_rpaths. as_slice ( ) ) ;
111
105
112
106
// Remove duplicates
@@ -146,17 +140,6 @@ pub fn get_rpath_relative_to_output(os: abi::Os,
146
140
prefix+"/" +relative. as_str ( ) . expect ( "non-utf8 component in path" )
147
141
}
148
142
149
- fn get_absolute_rpaths ( libs : & [ Path ] ) -> Vec < ~str > {
150
- libs. iter ( ) . map ( |a| get_absolute_rpath ( a) ) . collect ( )
151
- }
152
-
153
- pub fn get_absolute_rpath ( lib : & Path ) -> ~str {
154
- let mut p = os:: make_absolute ( lib) ;
155
- p. pop ( ) ;
156
- // FIXME (#9639): This needs to handle non-utf8 paths
157
- p. as_str ( ) . expect ( "non-utf8 component in rpath" ) . to_owned ( )
158
- }
159
-
160
143
pub fn get_install_prefix_rpath ( sysroot : & Path , target_triple : & str ) -> ~str {
161
144
let install_prefix = env ! ( "CFG_PREFIX" ) ;
162
145
@@ -183,7 +166,7 @@ pub fn minimize_rpaths(rpaths: &[~str]) -> Vec<~str> {
183
166
mod test {
184
167
use std:: os;
185
168
186
- use back:: rpath:: { get_absolute_rpath , get_install_prefix_rpath} ;
169
+ use back:: rpath:: get_install_prefix_rpath;
187
170
use back:: rpath:: { minimize_rpaths, rpaths_to_flags, get_rpath_relative_to_output} ;
188
171
use syntax:: abi;
189
172
use metadata:: filesearch;
@@ -258,15 +241,4 @@ mod test {
258
241
&Path::new(" lib/libstd. so"));
259
242
assert_eq!(res.as_slice(), " @loader_path/../lib" ) ;
260
243
}
261
-
262
- #[test]
263
- fn test_get_absolute_rpath() {
264
- let res = get_absolute_rpath(&Path::new(" lib/libstd. so"));
265
- let lib = os::make_absolute(&Path::new(" lib"));
266
- debug!(" test_get_absolute_rpath: { } vs. { } ",
267
- res.to_str(), lib.display());
268
-
269
- // FIXME (#9639): This needs to handle non-utf8 paths
270
- assert_eq!(res.as_slice(), lib.as_str().expect(" non-utf8 component in path" ) ) ;
271
- }
272
244
}
0 commit comments