File tree 1 file changed +8
-2
lines changed
1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -181,8 +181,7 @@ impl Config {
181
181
// appear to have this (even when `../lib` is redundant).
182
182
// NOTE: there are only two paths here, delimited by a `:`
183
183
let mut entries = OsString :: from ( "$ORIGIN/../lib:" ) ;
184
- entries. push ( t ! ( fs:: canonicalize( nix_deps_dir) ) ) ;
185
- entries. push ( "/lib" ) ;
184
+ entries. push ( t ! ( fs:: canonicalize( nix_deps_dir) ) . join ( "lib" ) ) ;
186
185
entries
187
186
} ;
188
187
patchelf. args ( & [ OsString :: from ( "--set-rpath" ) , rpath_entries] ) ;
@@ -370,6 +369,13 @@ impl Config {
370
369
if self . should_fix_bins_and_dylibs ( ) {
371
370
self . fix_bin_or_dylib ( & bin_root. join ( "bin" ) . join ( "rustfmt" ) ) ;
372
371
self . fix_bin_or_dylib ( & bin_root. join ( "bin" ) . join ( "cargo-fmt" ) ) ;
372
+ let lib_dir = bin_root. join ( "lib" ) ;
373
+ for lib in t ! ( fs:: read_dir( & lib_dir) , lib_dir. display( ) . to_string( ) ) {
374
+ let lib = t ! ( lib) ;
375
+ if lib. path ( ) . extension ( ) == Some ( OsStr :: new ( "so" ) ) {
376
+ self . fix_bin_or_dylib ( & lib. path ( ) ) ;
377
+ }
378
+ }
373
379
}
374
380
375
381
self . create ( & rustfmt_stamp, & channel) ;
You can’t perform that action at this time.
0 commit comments