Skip to content

Commit f6449ba

Browse files
committed
Auto merge of #7798 - jnbr:dylib_path, r=alexcrichton
Fix wrong directories in host_libdir. This fixes a regression from #7482 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.
2 parents 3a5f046 + f917e16 commit f6449ba

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/cargo/core/compiler/compilation.rs

Lines changed: 1 addition & 1 deletion
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)