diff options
| author | Randy MacLeod <Randy.MacLeod@windriver.com> | 2021-08-10 13:52:19 -0400 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-08-26 22:09:43 +0100 |
| commit | 61e1570c6a09c1984e919e8c0a82a74c1a08d821 (patch) | |
| tree | accab4b08aa3c62f098c9bb19399efb46906256a /meta/recipes-devtools/rust/rust-llvm.inc | |
| parent | 705b1d757fa221614f4f72cabf0fac5884cb6bfd (diff) | |
| download | poky-61e1570c6a09c1984e919e8c0a82a74c1a08d821.tar.gz | |
rust: initial merge of most of meta-rust
In the meta-rust repo at commit:
448047c Upgrade to 1.54.0 (#359)
Make the required directories:
mkdir ../oe-core/meta/recipes-devtools/rust
mkdir ../oe-core/meta/recipes-devtools/cargo
mkdir ../oe-core/meta/recipes-example
and then:
cp recipes-devtools/rust/* ../oe-core/meta/recipes-devtools/rust
cp recipes-devtools/cargo/* ../oe-core/meta/recipes-devtools/cargo
cp lib/crate.py ../oe-core/meta/lib
cp recipes-example/* ../oe-core/meta/recipes-example
cp conf/distro/include/rust_* ../oe-core/meta/conf/distro/include/
cp classes/* ../oe-core/meta/classes/
cp recipes-core/packagegroups/packagegroup-rust-cross-canadian.bb ../oe-core/meta/recipes-core/packagegroups
(From OE-Core rev: 3ed57578cca93ff1ba4e0bf3f25566e10659a2f9)
Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/rust/rust-llvm.inc')
| -rw-r--r-- | meta/recipes-devtools/rust/rust-llvm.inc | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/meta/recipes-devtools/rust/rust-llvm.inc b/meta/recipes-devtools/rust/rust-llvm.inc new file mode 100644 index 0000000000..93e1866317 --- /dev/null +++ b/meta/recipes-devtools/rust/rust-llvm.inc | |||
| @@ -0,0 +1,63 @@ | |||
| 1 | SUMMARY = "LLVM compiler framework (packaged with rust)" | ||
| 2 | LICENSE ?= "Apache-2.0-with-LLVM-exception" | ||
| 3 | |||
| 4 | SRC_URI += "file://0002-llvm-allow-env-override-of-exe-path.patch;striplevel=2" | ||
| 5 | |||
| 6 | S = "${RUSTSRC}/src/llvm-project/llvm" | ||
| 7 | |||
| 8 | LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=8a15a0759ef07f2682d2ba4b893c9afe" | ||
| 9 | |||
| 10 | inherit cmake python3native | ||
| 11 | |||
| 12 | DEPENDS += "ninja-native rust-llvm-native" | ||
| 13 | |||
| 14 | ARM_INSTRUCTION_SET:armv5 = "arm" | ||
| 15 | ARM_INSTRUCTION_SET:armv4t = "arm" | ||
| 16 | |||
| 17 | LLVM_DIR = "llvm${LLVM_RELEASE}" | ||
| 18 | |||
| 19 | EXTRA_OECMAKE = " \ | ||
| 20 | -DCMAKE_BUILD_TYPE=Release \ | ||
| 21 | -DLLVM_TARGETS_TO_BUILD='ARM;AArch64;Mips;PowerPC;RISCV;X86' \ | ||
| 22 | -DLLVM_BUILD_DOCS=OFF \ | ||
| 23 | -DLLVM_ENABLE_TERMINFO=OFF \ | ||
| 24 | -DLLVM_ENABLE_ZLIB=OFF \ | ||
| 25 | -DLLVM_ENABLE_LIBXML2=OFF \ | ||
| 26 | -DLLVM_ENABLE_FFI=OFF \ | ||
| 27 | -DLLVM_INSTALL_UTILS=ON \ | ||
| 28 | -DLLVM_BUILD_EXAMPLES=OFF \ | ||
| 29 | -DLLVM_INCLUDE_EXAMPLES=OFF \ | ||
| 30 | -DLLVM_BUILD_TESTS=OFF \ | ||
| 31 | -DLLVM_INCLUDE_TESTS=OFF \ | ||
| 32 | -DLLVM_TARGET_ARCH=${TARGET_ARCH} \ | ||
| 33 | -DCMAKE_INSTALL_PREFIX:PATH=${libdir}/llvm-rust \ | ||
| 34 | " | ||
| 35 | EXTRA_OECMAKE:append:class-target = "\ | ||
| 36 | -DCMAKE_CROSSCOMPILING:BOOL=ON \ | ||
| 37 | -DLLVM_BUILD_TOOLS=OFF \ | ||
| 38 | -DLLVM_TABLEGEN=${STAGING_LIBDIR_NATIVE}/llvm-rust/bin/llvm-tblgen \ | ||
| 39 | -DLLVM_CONFIG_PATH=${STAGING_LIBDIR_NATIVE}/llvm-rust/bin/llvm-config \ | ||
| 40 | " | ||
| 41 | |||
| 42 | # The debug symbols are huge here (>2GB) so suppress them since they | ||
| 43 | # provide almost no value. If you really need them then override this | ||
| 44 | INHIBIT_PACKAGE_DEBUG_SPLIT = "1" | ||
| 45 | |||
| 46 | export YOCTO_ALTERNATE_EXE_PATH = "${STAGING_LIBDIR}/llvm-rust/bin/llvm-config" | ||
| 47 | |||
| 48 | do_install:append () { | ||
| 49 | # we don't need any of this stuff to build Rust | ||
| 50 | rm -rf "${D}/usr/lib/cmake" | ||
| 51 | } | ||
| 52 | |||
| 53 | PACKAGES =+ "${PN}-bugpointpasses ${PN}-llvmhello ${PN}-liblto" | ||
| 54 | |||
| 55 | # Add the extra locations to avoid the complaints about unpackaged files | ||
| 56 | FILES:${PN}-bugpointpasses = "${libdir}/llvm-rust/lib/BugpointPasses.so" | ||
| 57 | FILES:${PN}-llvmhello = "${libdir}/llvm-rust/lib/LLVMHello.so" | ||
| 58 | FILES:${PN}-liblto = "${libdir}/llvm-rust/lib/libLTO.so.*" | ||
| 59 | FILES:${PN}-staticdev =+ "${libdir}/llvm-rust/*/*.a" | ||
| 60 | FILES:${PN} += "${libdir}/libLLVM*.so.* ${libdir}/llvm-rust/lib/*.so.* ${libdir}/llvm-rust/bin" | ||
| 61 | FILES:${PN}-dev += "${datadir}/llvm ${libdir}/llvm-rust/lib/*.so ${libdir}/llvm-rust/include ${libdir}/llvm-rust/share ${libdir}/llvm-rust/lib/cmake" | ||
| 62 | |||
| 63 | BBCLASSEXTEND = "native" | ||
