File tree Expand file tree Collapse file tree 1 file changed +12
-8
lines changed
compiler/rustc_codegen_ssa/src/back Expand file tree Collapse file tree 1 file changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -2065,16 +2065,20 @@ fn add_local_crate_metadata_objects(
20652065}
20662066
20672067/// Add sysroot and other globally set directories to the directory search list.
2068- fn add_library_search_dirs ( _cmd : & mut dyn Linker , sess : & Session , self_contained : bool ) {
2069- // The default library location, we need this to find the runtime.
2070- // The location of crates will be determined as needed.
2071- let _lib_path = sess. target_filesearch ( PathKind :: All ) . get_lib_path ( ) ;
2072- // cmd.include_path(&fix_windows_verbatim_for_gcc(&lib_path));
2073-
2068+ fn add_library_search_dirs ( cmd : & mut dyn Linker , sess : & Session , self_contained : bool ) {
20742069 // Special directory with libraries used only in self-contained linkage mode
20752070 if self_contained {
2076- let _lib_path = sess. target_filesearch ( PathKind :: All ) . get_self_contained_lib_path ( ) ;
2077- // cmd.include_path(&fix_windows_verbatim_for_gcc(&lib_path));
2071+ let lib_path = sess. target_filesearch ( PathKind :: All ) . get_self_contained_lib_path ( ) ;
2072+ cmd. include_path ( & fix_windows_verbatim_for_gcc ( & lib_path) ) ;
2073+ }
2074+
2075+ // The default library location, we need this to find the runtime.
2076+ // The location of crates will be determined as needed.
2077+ // `copy_third_party_objects`
2078+ if sess. target . vendor == "fortanix" || sess. target . os == "linux" || sess. target . os == "fuchsia"
2079+ {
2080+ let lib_path = sess. target_filesearch ( PathKind :: Native ) . get_lib_path ( ) ;
2081+ cmd. include_path ( & fix_windows_verbatim_for_gcc ( & lib_path) ) ;
20782082 }
20792083}
20802084
You can’t perform that action at this time.
0 commit comments