rust-llvm-native: build LLVM in its own recipe

rust takes a painfully long time to build.  A non-trivial part of that
is building LLVM.  Fortuitiously, the LLVM component is common between
the -native compiler and all variants of the -cross compiler.  That
means we can build it once, and reuse the output for any flavor of rust.
That saves build time, and it utilizes bitbake's sstate more
efficiently.  It's win/win!
This commit is contained in:
Steven Walter
2015-06-18 15:19:14 -04:00
committed by Steven Walter
parent 6ba4aebdce
commit 411f10502c
3 changed files with 28 additions and 1 deletions
+27
View File
@@ -0,0 +1,27 @@
SUMMARY = "LLVM compiler framework (packaged with rust)"
LICENSE = "NCSA"
LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=47e311aa9caedd1b3abf098bd7814d1d"
# 1.1.0
require rust-release.inc
SRC_URI[rust.md5sum] = "5f2f923f8d1c77a55721d1f0813a158a"
SRC_URI[rust.sha256sum] = "cb09f443b37ec1b81fe73c04eb413f9f656859cf7d00bc5088008cbc2a63fa8a"
S = "${WORKDIR}/rustc-${PV}/src/llvm"
inherit autotools
inherit native
EXTRA_OECONF += "--enable-targets=x86,x86_64,arm,aarch64,mips,powerpc"
EXTRA_OECONF += "--enable-optimized"
EXTRA_OECONF += "--disable-bindings"
do_install_append () {
cd ${D}${bindir}
ln -s *-llc llc
for i in *-llvm-*; do
link=$(echo $i | sed -e 's/.*-llvm-\(.*\)/\1/')
ln -s $i llvm-$link
done
}
-1
View File
@@ -3,5 +3,4 @@ SRC_URI = "\
"
S = "${WORKDIR}/rustc-${PV}"
require rust.inc
+1
View File
@@ -1,5 +1,6 @@
# 1.1.0
require rust-release.inc
require rust.inc
SRC_URI[rust.md5sum] = "5f2f923f8d1c77a55721d1f0813a158a"
SRC_URI[rust.sha256sum] = "cb09f443b37ec1b81fe73c04eb413f9f656859cf7d00bc5088008cbc2a63fa8a"