Tweak inhibit, move comment, update rustc ln

This commit is contained in:
Cody P Schafer
2014-12-02 16:33:00 -05:00
parent f5c33194a8
commit 75deda4847
2 changed files with 8 additions and 10 deletions
+5 -9
View File
@@ -6,15 +6,11 @@ CARGO = "cargo"
# versions of rust than cargo is able to build with. Thankfully, we don't need # versions of rust than cargo is able to build with. Thankfully, we don't need
# any custom cargo configuration, and can use a vanilla cargo binary. # any custom cargo configuration, and can use a vanilla cargo binary.
# #
# If you want to have cargo built for packages that depend on it, set # We recommend setting ASSUME_PROVIDED += "cargo-native" in your local.conf
# INHIBIT_CARGO_DEP = "0" in your local.conf, distro.conf, or other global
# config file.
INHIBIT_CARGO_DEP ??= "1"
def cargo_base_dep(d): def cargo_base_dep(d):
deps = "" deps = ""
if not d.getVar('INHIBIT_DEFAULT_DEPS') and d.getVar('INHIBIT_CARGO_DEP') != "0": if not d.getVar('INHIBIT_DEFAULT_DEPS') and not d.getVar('INHIBIT_CARGO_DEP'):
deps += " cargo-native" deps += " cargo-native"
return deps return deps
BASEDEPENDS_append = " ${@cargo_base_dep(d)}" BASEDEPENDS_append = " ${@cargo_base_dep(d)}"
@@ -49,6 +45,8 @@ oe_cargo_config () {
} }
rust_cargo_patch () { rust_cargo_patch () {
# FIXME: if there is already an entry for this target, in an existing
# cargo/config, this won't work.
cd "${S}" cd "${S}"
cat >>Cargo.toml <<EOF cat >>Cargo.toml <<EOF
[profile.dev] [profile.dev]
@@ -67,8 +65,6 @@ export RUST_CC = "${CCACHE}${TARGET_PREFIX}gcc"
export RUST_CFLAGS = "${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS} ${CFLAGS}" export RUST_CFLAGS = "${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS} ${CFLAGS}"
oe_cargo_build () { oe_cargo_build () {
# FIXME: if there is already an entry for this target, in an existing
# cargo/config, this won't work.
which cargo which cargo
which rustc which rustc
bbnote ${CARGO} build --target ${TARGET_SYS} "$@" bbnote ${CARGO} build --target ${TARGET_SYS} "$@"
+3 -1
View File
@@ -343,7 +343,9 @@ rust_do_install () {
## rust will complain about multiple providers of the runtime libs ## rust will complain about multiple providers of the runtime libs
## (libstd, libsync, etc.) without this. ## (libstd, libsync, etc.) without this.
ln -sf "${D}${libdir}/rustlib/${HOST_SYS}/lib/lib*.so" "${D}${libdir}/" pushd "${D}${libdir}"
ln -sf "rustlib/${HOST_SYS}/lib/lib"*.so .
popd
} }
do_install () { do_install () {