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 @@ -173,8 +173,7 @@ impl Config {
173
173
// appear to have this (even when `../lib` is redundant).
174
174
// NOTE: there are only two paths here, delimited by a `:`
175
175
let mut entries = OsString :: from ( "$ORIGIN/../lib:" ) ;
176
- entries. push ( t ! ( fs:: canonicalize( nix_deps_dir) ) ) ;
177
- entries. push ( "/lib" ) ;
176
+ entries. push ( t ! ( fs:: canonicalize( nix_deps_dir) ) . join ( "lib" ) ) ;
178
177
entries
179
178
} ;
180
179
patchelf. args ( & [ OsString :: from ( "--set-rpath" ) , rpath_entries] ) ;
@@ -353,6 +352,13 @@ impl Config {
353
352
if self . should_fix_bins_and_dylibs ( ) {
354
353
self . fix_bin_or_dylib ( & bin_root. join ( "bin" ) . join ( "rustfmt" ) ) ;
355
354
self . fix_bin_or_dylib ( & bin_root. join ( "bin" ) . join ( "cargo-fmt" ) ) ;
355
+ let lib_dir = bin_root. join ( "lib" ) ;
356
+ for lib in t ! ( fs:: read_dir( & lib_dir) , lib_dir. display( ) . to_string( ) ) {
357
+ let lib = t ! ( lib) ;
358
+ if lib. path ( ) . extension ( ) == Some ( OsStr :: new ( "so" ) ) {
359
+ self . fix_bin_or_dylib ( & lib. path ( ) ) ;
360
+ }
361
+ }
356
362
}
357
363
358
364
self . create ( & rustfmt_stamp, & channel) ;
You can’t perform that action at this time.
0 commit comments