Skip to content

Commit

Permalink
Fix wrong directories in host_libdir.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
jnbr committed Jan 14, 2020
1 parent ad3dbe1 commit f917e16
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cargo/core/compiler/compilation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down

0 comments on commit f917e16

Please sign in to comment.