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.
This commit is contained in:
Johannes Brechtmann 2020-01-14 22:57:23 +01:00
parent ad3dbe10e1
commit f917e169ab

View File

@ -101,7 +101,7 @@ impl<'cfg> Compilation<'cfg> {
root_output: PathBuf::from("/"),
deps_output: PathBuf::from("/"),
host_deps_output: PathBuf::from("/"),
host_dylib_path: bcx.info(default_kind).sysroot_host_libdir.clone(),
host_dylib_path: bcx.info(CompileKind::Host).sysroot_host_libdir.clone(),
target_dylib_path: bcx.info(default_kind).sysroot_target_libdir.clone(),
tests: Vec::new(),
binaries: Vec::new(),