Skip to content

Commit f917e16

Browse files
committed
Fix wrong directories in host_libdir.
This fixes a regression from #7475 where the sysroot_target_libdir leaks into the host libdir. This can cause problems when the dynamic linker does not ignore the target libraries but tries to load them instead. This happens for example when building on x86_64-musl for aarch64-musl.
1 parent ad3dbe1 commit f917e16

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/cargo/core/compiler/compilation.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ impl<'cfg> Compilation<'cfg> {
101101
root_output: PathBuf::from("/"),
102102
deps_output: PathBuf::from("/"),
103103
host_deps_output: PathBuf::from("/"),
104-
host_dylib_path: bcx.info(default_kind).sysroot_host_libdir.clone(),
104+
host_dylib_path: bcx.info(CompileKind::Host).sysroot_host_libdir.clone(),
105105
target_dylib_path: bcx.info(default_kind).sysroot_target_libdir.clone(),
106106
tests: Vec::new(),
107107
binaries: Vec::new(),

0 commit comments

Comments
 (0)