Skip to content

Commit

Permalink
Auto merge of #7798 - jnbr:dylib_path, r=alexcrichton
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
bors committed Jan 21, 2020
2 parents 3a5f046 + f917e16 commit f6449ba
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 f6449ba

Please sign in to comment.