@@ -35,7 +35,7 @@ use crate::utils::build_stamp::{self, BuildStamp};
3535use crate :: utils:: channel:: { self , Info } ;
3636use crate :: utils:: exec:: { BootstrapCommand , command} ;
3737use crate :: utils:: helpers:: {
38- exe, is_dylib, move_file, t, target_supports_cranelift_backend, timeit,
38+ exe, is_dylib, libdir , move_file, t, target_supports_cranelift_backend, timeit,
3939} ;
4040use crate :: utils:: tarball:: { GeneratedTarball , OverlayKind , Tarball } ;
4141use crate :: { CodegenBackendKind , Compiler , DependencyType , FileType , LLVM_TOOLS , Mode , trace} ;
@@ -2518,7 +2518,7 @@ fn maybe_install_llvm(
25182518 }
25192519}
25202520
2521- /// Maybe add libLLVM.so to the target lib-dir for linking .
2521+ /// Maybe add libLLVM.so to the target runtime lib-dir.
25222522#[ cfg_attr(
25232523 feature = "tracing" ,
25242524 instrument(
@@ -2533,7 +2533,7 @@ fn maybe_install_llvm(
25332533 ) ,
25342534) ]
25352535pub fn maybe_install_llvm_target ( builder : & Builder < ' _ > , target : TargetSelection , sysroot : & Path ) {
2536- let dst_libdir = sysroot. join ( "lib/rustlib" ) . join ( target) . join ( "lib" ) ;
2536+ let dst_libdir = sysroot. join ( "lib/rustlib" ) . join ( target) . join ( libdir ( target ) ) ;
25372537 // We do not need to copy LLVM files into the sysroot if it is not
25382538 // dynamically linked; it is already included into librustc_llvm
25392539 // statically.
@@ -2557,7 +2557,8 @@ pub fn maybe_install_llvm_target(builder: &Builder<'_>, target: TargetSelection,
25572557 ) ,
25582558) ]
25592559pub fn maybe_install_llvm_runtime ( builder : & Builder < ' _ > , target : TargetSelection , sysroot : & Path ) {
2560- let dst_libdir = sysroot. join ( builder. sysroot_libdir_relative ( Compiler :: new ( 1 , target) ) ) ;
2560+ let dst_libdir =
2561+ sysroot. join ( builder. sysroot_runtime_libdir_relative ( Compiler :: new ( 1 , target) ) ) ;
25612562 // We do not need to copy LLVM files into the sysroot if it is not
25622563 // dynamically linked; it is already included into librustc_llvm
25632564 // statically.
0 commit comments