@@ -32,7 +32,7 @@ pub fn walk_native_lib_search_dirs<R>(
3232 f ( & search_path. dir , false ) ?;
3333 }
3434 for search_path in sess. target_filesearch ( PathKind :: Framework ) . cli_search_paths ( ) {
35- // Contrary to the `-L` docs only framework-specific paths are considered here .
35+ // Frameworks are looked up strictly in framework-specific paths.
3636 if search_path. kind != PathKind :: All {
3737 f ( & search_path. dir , true ) ?;
3838 }
@@ -45,7 +45,7 @@ pub fn walk_native_lib_search_dirs<R>(
4545 | LinkSelfContainedComponents :: UNWIND
4646 | LinkSelfContainedComponents :: MINGW ,
4747 ) {
48- f ( & sess. target_filesearch ( PathKind :: Native ) . get_self_contained_lib_path ( ) , false ) ?;
48+ f ( & sess. target_tlib_path . dir . join ( "self-contained" ) , false ) ?;
4949 }
5050
5151 // Toolchains for some targets may ship `libunwind.a`, but place it into the main sysroot
@@ -59,7 +59,7 @@ pub fn walk_native_lib_search_dirs<R>(
5959 || sess. target . os == "fuchsia"
6060 || sess. target . is_like_osx && !sess. opts . unstable_opts . sanitizer . is_empty ( )
6161 {
62- f ( & sess. target_filesearch ( PathKind :: Native ) . get_lib_path ( ) , false ) ?;
62+ f ( & sess. target_tlib_path . dir , false ) ?;
6363 }
6464
6565 // Mac Catalyst uses the macOS SDK, but to link to iOS-specific frameworks
0 commit comments