cargo-native builds

This commit is contained in:
Cody P Schafer
2014-12-01 11:06:00 -05:00
parent d45bd8f7a3
commit e7917112b6
6 changed files with 58 additions and 8 deletions
+10
View File
@@ -41,6 +41,14 @@ rpath = true
EOF
}
# All the rust & cargo ecosystem assume that CC, LD, etc are a path to a single
# command. Fixup the ones we give it so that is the case.
# XXX: this is hard coded based on meta/conf/bitbake.conf
# TODO: we do quite a bit very similar to this in rust.inc, see if it can be
# generalized.
export RUST_CC = "${CCACHE}${TARGET_PREFIX}gcc"
export RUST_CFLAGS = "${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS} ${CFLAGS}"
oe_cargo_build () {
# FIXME: if there is already an entry for this target, in an existing
# cargo/config, this won't work.
@@ -53,6 +61,8 @@ oe_cargo_build () {
cargo_do_compile () {
cd "${B}"
export CC="${RUST_CC}"
export CFLAGS="${RUST_CFLAGS}"
oe_cargo_build
}
-1
View File
@@ -44,7 +44,6 @@ RUST_BUILD_SYS = "${@rust_base_triple(d, 'BUILD')}"
RUST_HOST_SYS = "${@rust_base_triple(d, 'HOST')}"
RUST_TARGET_SYS = "${@rust_base_triple(d, 'TARGET')}"
# BUILD_LDFLAGS
# ${STAGING_LIBDIR_NATIVE}
# ${STAGING_BASE_LIBDIR_NATIVE}