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 @@ -173,8 +173,7 @@ impl Config {
173173 // appear to have this (even when `../lib` is redundant).
174174 // NOTE: there are only two paths here, delimited by a `:`
175175 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" ) ) ;
178177 entries
179178 } ;
180179 patchelf. args ( & [ OsString :: from ( "--set-rpath" ) , rpath_entries] ) ;
@@ -353,6 +352,13 @@ impl Config {
353352 if self . should_fix_bins_and_dylibs ( ) {
354353 self . fix_bin_or_dylib ( & bin_root. join ( "bin" ) . join ( "rustfmt" ) ) ;
355354 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+ }
356362 }
357363
358364 self . create ( & rustfmt_stamp, & channel) ;
You can’t perform that action at this time.
0 commit comments