File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -181,8 +181,7 @@ impl Config {
181181 // appear to have this (even when `../lib` is redundant).
182182 // NOTE: there are only two paths here, delimited by a `:`
183183 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" ) ) ;
186185 entries
187186 } ;
188187 patchelf. args ( & [ OsString :: from ( "--set-rpath" ) , rpath_entries] ) ;
@@ -370,6 +369,13 @@ impl Config {
370369 if self . should_fix_bins_and_dylibs ( ) {
371370 self . fix_bin_or_dylib ( & bin_root. join ( "bin" ) . join ( "rustfmt" ) ) ;
372371 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+ }
373379 }
374380
375381 self . create ( & rustfmt_stamp, & channel) ;
You can’t perform that action at this time.
0 commit comments