diff options
author | Alex Kiernan <alex.kiernan@gmail.com> | 2022-12-28 15:23:23 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-12-28 23:59:56 +0000 |
commit | 4c4cb3030138d58d2e16860dd9c42145f6f1c52c (patch) | |
tree | 2cb6aa4f17b4622117a6f036bfa6a118c01ca4f2 /meta/recipes-devtools/rust | |
parent | cad78dd5bd15aa39daa678607fcd1ea2108ce765 (diff) | |
download | poky-4c4cb3030138d58d2e16860dd9c42145f6f1c52c.tar.gz |
rust-llvm: Merge .inc into .bb
(From OE-Core rev: 5a8f72fc9ae730be21bbc577d8315ae95f771dba)
Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/rust')
-rw-r--r-- | meta/recipes-devtools/rust/rust-llvm.inc | 78 | ||||
-rw-r--r-- | meta/recipes-devtools/rust/rust-llvm_1.66.0.bb | 80 |
2 files changed, 79 insertions, 79 deletions
diff --git a/meta/recipes-devtools/rust/rust-llvm.inc b/meta/recipes-devtools/rust/rust-llvm.inc deleted file mode 100644 index 625eb57041..0000000000 --- a/meta/recipes-devtools/rust/rust-llvm.inc +++ /dev/null | |||
@@ -1,78 +0,0 @@ | |||
1 | SUMMARY = "LLVM compiler framework (packaged with rust)" | ||
2 | LICENSE ?= "Apache-2.0-with-LLVM-exception" | ||
3 | HOMEPAGE = "http://www.rust-lang.org" | ||
4 | |||
5 | SRC_URI += "file://0002-llvm-allow-env-override-of-exe-path.patch;striplevel=2 \ | ||
6 | file://0001-AsmMatcherEmitter-sort-ClassInfo-lists-by-name-as-we.patch;striplevel=2 \ | ||
7 | file://0003-llvm-fix-include-benchmarks.patch;striplevel=2" | ||
8 | |||
9 | S = "${RUSTSRC}/src/llvm-project/llvm" | ||
10 | |||
11 | LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=8a15a0759ef07f2682d2ba4b893c9afe" | ||
12 | |||
13 | inherit cmake python3native | ||
14 | |||
15 | DEPENDS += "ninja-native rust-llvm-native" | ||
16 | |||
17 | ARM_INSTRUCTION_SET:armv5 = "arm" | ||
18 | ARM_INSTRUCTION_SET:armv4t = "arm" | ||
19 | |||
20 | # rustc_llvm with debug info is not recognized as a valid crate that's | ||
21 | # generated by rust-llvm-native. | ||
22 | CFLAGS:remove = "-g" | ||
23 | CXXFLAGS:remove = "-g" | ||
24 | |||
25 | LLVM_DIR = "llvm${LLVM_RELEASE}" | ||
26 | |||
27 | EXTRA_OECMAKE = " \ | ||
28 | -DCMAKE_BUILD_TYPE=Release \ | ||
29 | -DLLVM_TARGETS_TO_BUILD='ARM;AArch64;Mips;PowerPC;RISCV;X86' \ | ||
30 | -DLLVM_BUILD_DOCS=OFF \ | ||
31 | -DLLVM_ENABLE_TERMINFO=OFF \ | ||
32 | -DLLVM_ENABLE_ZLIB=OFF \ | ||
33 | -DLLVM_ENABLE_LIBXML2=OFF \ | ||
34 | -DLLVM_ENABLE_FFI=OFF \ | ||
35 | -DLLVM_INSTALL_UTILS=ON \ | ||
36 | -DLLVM_BUILD_EXAMPLES=OFF \ | ||
37 | -DLLVM_INCLUDE_EXAMPLES=OFF \ | ||
38 | -DLLVM_BUILD_TESTS=OFF \ | ||
39 | -DLLVM_INCLUDE_TESTS=OFF \ | ||
40 | -DLLVM_TARGET_ARCH=${TARGET_ARCH} \ | ||
41 | -DCMAKE_INSTALL_PREFIX:PATH=${libdir}/llvm-rust \ | ||
42 | " | ||
43 | EXTRA_OECMAKE:append:class-target = "\ | ||
44 | -DCMAKE_CROSSCOMPILING:BOOL=ON \ | ||
45 | -DLLVM_BUILD_TOOLS=OFF \ | ||
46 | -DLLVM_TABLEGEN=${STAGING_LIBDIR_NATIVE}/llvm-rust/bin/llvm-tblgen \ | ||
47 | -DLLVM_CONFIG_PATH=${STAGING_LIBDIR_NATIVE}/llvm-rust/bin/llvm-config \ | ||
48 | " | ||
49 | |||
50 | EXTRA_OECMAKE:append:class-nativesdk = "\ | ||
51 | -DCMAKE_CROSSCOMPILING:BOOL=ON \ | ||
52 | -DLLVM_BUILD_TOOLS=OFF \ | ||
53 | -DLLVM_TABLEGEN=${STAGING_LIBDIR_NATIVE}/llvm-rust/bin/llvm-tblgen \ | ||
54 | -DLLVM_CONFIG_PATH=${STAGING_LIBDIR_NATIVE}/llvm-rust/bin/llvm-config \ | ||
55 | " | ||
56 | |||
57 | # The debug symbols are huge here (>2GB) so suppress them since they | ||
58 | # provide almost no value. If you really need them then override this | ||
59 | INHIBIT_PACKAGE_DEBUG_SPLIT = "1" | ||
60 | |||
61 | export YOCTO_ALTERNATE_EXE_PATH = "${STAGING_LIBDIR}/llvm-rust/bin/llvm-config" | ||
62 | |||
63 | do_install:append () { | ||
64 | # we don't need any of this stuff to build Rust | ||
65 | rm -rf "${D}/usr/lib/cmake" | ||
66 | } | ||
67 | |||
68 | PACKAGES =+ "${PN}-bugpointpasses ${PN}-llvmhello ${PN}-liblto" | ||
69 | |||
70 | # Add the extra locations to avoid the complaints about unpackaged files | ||
71 | FILES:${PN}-bugpointpasses = "${libdir}/llvm-rust/lib/BugpointPasses.so" | ||
72 | FILES:${PN}-llvmhello = "${libdir}/llvm-rust/lib/LLVMHello.so" | ||
73 | FILES:${PN}-liblto = "${libdir}/llvm-rust/lib/libLTO.so.*" | ||
74 | FILES:${PN}-staticdev =+ "${libdir}/llvm-rust/*/*.a" | ||
75 | FILES:${PN} += "${libdir}/libLLVM*.so.* ${libdir}/llvm-rust/lib/*.so.* ${libdir}/llvm-rust/bin" | ||
76 | FILES:${PN}-dev += "${datadir}/llvm ${libdir}/llvm-rust/lib/*.so ${libdir}/llvm-rust/include ${libdir}/llvm-rust/share ${libdir}/llvm-rust/lib/cmake" | ||
77 | |||
78 | BBCLASSEXTEND = "native nativesdk" | ||
diff --git a/meta/recipes-devtools/rust/rust-llvm_1.66.0.bb b/meta/recipes-devtools/rust/rust-llvm_1.66.0.bb index 396f741953..e1baeb7857 100644 --- a/meta/recipes-devtools/rust/rust-llvm_1.66.0.bb +++ b/meta/recipes-devtools/rust/rust-llvm_1.66.0.bb | |||
@@ -1,6 +1,84 @@ | |||
1 | SUMMARY = "LLVM compiler framework (packaged with rust)" | ||
2 | LICENSE ?= "Apache-2.0-with-LLVM-exception" | ||
3 | HOMEPAGE = "http://www.rust-lang.org" | ||
4 | |||
1 | # check src/llvm-project/llvm/CMakeLists.txt for llvm version in use | 5 | # check src/llvm-project/llvm/CMakeLists.txt for llvm version in use |
2 | # | 6 | # |
3 | LLVM_RELEASE = "14.0.5" | 7 | LLVM_RELEASE = "14.0.5" |
8 | |||
4 | require rust-source.inc | 9 | require rust-source.inc |
5 | require rust-llvm.inc | ||
6 | 10 | ||
11 | SRC_URI += "file://0002-llvm-allow-env-override-of-exe-path.patch;striplevel=2 \ | ||
12 | file://0001-AsmMatcherEmitter-sort-ClassInfo-lists-by-name-as-we.patch;striplevel=2 \ | ||
13 | file://0003-llvm-fix-include-benchmarks.patch;striplevel=2" | ||
14 | |||
15 | S = "${RUSTSRC}/src/llvm-project/llvm" | ||
16 | |||
17 | LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=8a15a0759ef07f2682d2ba4b893c9afe" | ||
18 | |||
19 | inherit cmake python3native | ||
20 | |||
21 | DEPENDS += "ninja-native rust-llvm-native" | ||
22 | |||
23 | ARM_INSTRUCTION_SET:armv5 = "arm" | ||
24 | ARM_INSTRUCTION_SET:armv4t = "arm" | ||
25 | |||
26 | # rustc_llvm with debug info is not recognized as a valid crate that's | ||
27 | # generated by rust-llvm-native. | ||
28 | CFLAGS:remove = "-g" | ||
29 | CXXFLAGS:remove = "-g" | ||
30 | |||
31 | LLVM_DIR = "llvm${LLVM_RELEASE}" | ||
32 | |||
33 | EXTRA_OECMAKE = " \ | ||
34 | -DCMAKE_BUILD_TYPE=Release \ | ||
35 | -DLLVM_TARGETS_TO_BUILD='ARM;AArch64;Mips;PowerPC;RISCV;X86' \ | ||
36 | -DLLVM_BUILD_DOCS=OFF \ | ||
37 | -DLLVM_ENABLE_TERMINFO=OFF \ | ||
38 | -DLLVM_ENABLE_ZLIB=OFF \ | ||
39 | -DLLVM_ENABLE_LIBXML2=OFF \ | ||
40 | -DLLVM_ENABLE_FFI=OFF \ | ||
41 | -DLLVM_INSTALL_UTILS=ON \ | ||
42 | -DLLVM_BUILD_EXAMPLES=OFF \ | ||
43 | -DLLVM_INCLUDE_EXAMPLES=OFF \ | ||
44 | -DLLVM_BUILD_TESTS=OFF \ | ||
45 | -DLLVM_INCLUDE_TESTS=OFF \ | ||
46 | -DLLVM_TARGET_ARCH=${TARGET_ARCH} \ | ||
47 | -DCMAKE_INSTALL_PREFIX:PATH=${libdir}/llvm-rust \ | ||
48 | " | ||
49 | EXTRA_OECMAKE:append:class-target = "\ | ||
50 | -DCMAKE_CROSSCOMPILING:BOOL=ON \ | ||
51 | -DLLVM_BUILD_TOOLS=OFF \ | ||
52 | -DLLVM_TABLEGEN=${STAGING_LIBDIR_NATIVE}/llvm-rust/bin/llvm-tblgen \ | ||
53 | -DLLVM_CONFIG_PATH=${STAGING_LIBDIR_NATIVE}/llvm-rust/bin/llvm-config \ | ||
54 | " | ||
55 | |||
56 | EXTRA_OECMAKE:append:class-nativesdk = "\ | ||
57 | -DCMAKE_CROSSCOMPILING:BOOL=ON \ | ||
58 | -DLLVM_BUILD_TOOLS=OFF \ | ||
59 | -DLLVM_TABLEGEN=${STAGING_LIBDIR_NATIVE}/llvm-rust/bin/llvm-tblgen \ | ||
60 | -DLLVM_CONFIG_PATH=${STAGING_LIBDIR_NATIVE}/llvm-rust/bin/llvm-config \ | ||
61 | " | ||
62 | |||
63 | # The debug symbols are huge here (>2GB) so suppress them since they | ||
64 | # provide almost no value. If you really need them then override this | ||
65 | INHIBIT_PACKAGE_DEBUG_SPLIT = "1" | ||
66 | |||
67 | export YOCTO_ALTERNATE_EXE_PATH = "${STAGING_LIBDIR}/llvm-rust/bin/llvm-config" | ||
68 | |||
69 | do_install:append () { | ||
70 | # we don't need any of this stuff to build Rust | ||
71 | rm -rf "${D}/usr/lib/cmake" | ||
72 | } | ||
73 | |||
74 | PACKAGES =+ "${PN}-bugpointpasses ${PN}-llvmhello ${PN}-liblto" | ||
75 | |||
76 | # Add the extra locations to avoid the complaints about unpackaged files | ||
77 | FILES:${PN}-bugpointpasses = "${libdir}/llvm-rust/lib/BugpointPasses.so" | ||
78 | FILES:${PN}-llvmhello = "${libdir}/llvm-rust/lib/LLVMHello.so" | ||
79 | FILES:${PN}-liblto = "${libdir}/llvm-rust/lib/libLTO.so.*" | ||
80 | FILES:${PN}-staticdev =+ "${libdir}/llvm-rust/*/*.a" | ||
81 | FILES:${PN} += "${libdir}/libLLVM*.so.* ${libdir}/llvm-rust/lib/*.so.* ${libdir}/llvm-rust/bin" | ||
82 | FILES:${PN}-dev += "${datadir}/llvm ${libdir}/llvm-rust/lib/*.so ${libdir}/llvm-rust/include ${libdir}/llvm-rust/share ${libdir}/llvm-rust/lib/cmake" | ||
83 | |||
84 | BBCLASSEXTEND = "native nativesdk" | ||