rustlib: libdir may be different between build and host

With multilib, we may want to install under lib64 but the rust libraries
get published in the build sysroot under the libdir for the build
machine which is usually just lib. Support these being different.
This commit is contained in:
Tyler Hall authored and Steven Walter committed 2016-02-02 11:40:25 -05:00
1 parent f0ea28ae30
commit aaaeaeed3f
2 files changed
+6 -2

No files matched your search

+5 -1
View File
@@ -36,7 +36,11 @@ OVERLAP_DEPS = "${@get_overlap_deps(d)}"
# See https://github.com/rust-lang/rust/issues/19680
RUSTC_FLAGS += "-C prefer-dynamic"
rustlib="${libdir}/${TUNE_ARCH}${TARGET_VENDOR}-${TARGET_OS}/rustlib/${HOST_SYS}/lib"
rustlib_suffix="${TUNE_ARCH}${TARGET_VENDOR}-${TARGET_OS}/rustlib/${HOST_SYS}/lib"
# Native sysroot standard library path
rustlib_src="${prefix}/lib/${rustlib_suffix}"
# Host sysroot standard library path
rustlib="${libdir}/${rustlib_suffix}"
CRATE_NAME ?= "${@d.getVar('BPN', True).replace('-rs', '').replace('-', '_')}"
BINNAME ?= "${BPN}"
LIBNAME ?= "lib${CRATE_NAME}-rs"