From 2af0e67983fc108779e8153300c5a7c8daab8eca Mon Sep 17 00:00:00 2001 From: Steven Walter Date: Thu, 18 Jun 2015 15:30:09 -0400 Subject: [PATCH] rust.inc: use separately-built LLVM This makes builds more efficient, in that we only have to rebuild llvm when llvm changes, rather than every time rustc changes --- recipes/rust/rust.inc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/recipes/rust/rust.inc b/recipes/rust/rust.inc index e6f25c8..e80c9f7 100644 --- a/recipes/rust/rust.inc +++ b/recipes/rust/rust.inc @@ -8,6 +8,9 @@ LICENSE = "MIT | Apache-2.0" B = "${WORKDIR}/build" +DEPENDS += "rust-llvm-native" +DEPENDS_class-cross += "rust-llvm-native" + # Avoid having the default bitbake.conf disable sub-make parallelization EXTRA_OEMAKE = "" @@ -272,6 +275,8 @@ python do_rust_arch_fixup () { addtask rust_arch_fixup before do_configure after do_patch do_rust_arch_fixup[dirs] = "${S}/mk/cfg" +llvmdir = "${STAGING_DIR_NATIVE}/${prefix_native}" + do_configure () { # FIXME: target_prefix vs prefix, see cross.bbclass @@ -309,7 +314,7 @@ do_configure () { "--enable-debuginfo" \ "--enable-optimize" \ "--enable-optimize-cxx" \ - "--enable-optimize-llvm" \ + "--llvm-root=${llvmdir}" \ "--enable-optimize-tests" \ "--prefix=${prefix}" \ "--target=${TARGET_SYS}" \