summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/rust/rust-llvm_1.72.0.bb
diff options
context:
space:
mode:
authorAlex Kiernan <alex.kiernan@gmail.com>2023-12-29 11:44:31 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-12-30 11:03:08 +0000
commit6eabf7e4b41105facf233b386647efc91339ea92 (patch)
tree5d022a8afb8676b91a3477e861fcd6c0e8d8fb29 /meta/recipes-devtools/rust/rust-llvm_1.72.0.bb
parentb40a8e02084b8c554cc15516223f9858c4636439 (diff)
downloadpoky-6eabf7e4b41105facf233b386647efc91339ea92.tar.gz
rust: Upgrade 1.71.1 -> 1.72.0
Drop getrandom-open64.patch (merged upstream). Revert https://github.com/rust-lang/cc-rs/commit/c4f414f449bb7cffba3bc923f277704d1d08a8ec ("Map source absolute paths to OUT_DIR as relative. (#684)") which causes hashed versions of the build path to be used as part of the filename of generated objects and hence reproducibility issues. https://blog.rust-lang.org/2023/08/24/Rust-1.72.0.html (From OE-Core rev: 30637cdeb31fae02544fdc643a455d0ebb126ee6) 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/rust-llvm_1.72.0.bb')
-rw-r--r--meta/recipes-devtools/rust/rust-llvm_1.72.0.bb94
1 files changed, 94 insertions, 0 deletions
diff --git a/meta/recipes-devtools/rust/rust-llvm_1.72.0.bb b/meta/recipes-devtools/rust/rust-llvm_1.72.0.bb
new file mode 100644
index 0000000000..5bfc1faea8
--- /dev/null
+++ b/meta/recipes-devtools/rust/rust-llvm_1.72.0.bb
@@ -0,0 +1,94 @@
1SUMMARY = "LLVM compiler framework (packaged with rust)"
2LICENSE ?= "Apache-2.0-with-LLVM-exception"
3HOMEPAGE = "http://www.rust-lang.org"
4
5# check src/llvm-project/llvm/CMakeLists.txt for llvm version in use
6#
7LLVM_RELEASE = "16.0.2"
8
9require rust-source.inc
10
11SRC_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
15S = "${RUSTSRC}/src/llvm-project/llvm"
16
17LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=8a15a0759ef07f2682d2ba4b893c9afe"
18
19inherit cmake
20
21DEPENDS += "ninja-native rust-llvm-native"
22
23ARM_INSTRUCTION_SET:armv5 = "arm"
24ARM_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.
28CFLAGS:remove = "-g"
29CXXFLAGS:remove = "-g"
30
31LLVM_DIR = "llvm${LLVM_RELEASE}"
32
33RUST_LLVM_TARGETS ?= "ARM;AArch64;Mips;PowerPC;RISCV;X86"
34
35EXTRA_OECMAKE = " \
36 -DCMAKE_BUILD_TYPE=Release \
37 -DLLVM_TARGETS_TO_BUILD='${RUST_LLVM_TARGETS}' \
38 -DLLVM_BUILD_DOCS=OFF \
39 -DLLVM_ENABLE_TERMINFO=OFF \
40 -DLLVM_ENABLE_ZLIB=OFF \
41 -DLLVM_ENABLE_ZSTD=OFF \
42 -DLLVM_ENABLE_LIBXML2=OFF \
43 -DLLVM_ENABLE_FFI=OFF \
44 -DLLVM_INSTALL_UTILS=ON \
45 -DLLVM_BUILD_EXAMPLES=OFF \
46 -DLLVM_INCLUDE_EXAMPLES=OFF \
47 -DLLVM_BUILD_TESTS=OFF \
48 -DLLVM_INCLUDE_TESTS=OFF \
49 -DLLVM_TARGET_ARCH=${TARGET_ARCH} \
50 -DCMAKE_INSTALL_PREFIX:PATH=${libdir}/llvm-rust \
51"
52
53# Forcibly disable the detection of these packages as otherwise
54# it will look at the host Python install
55EXTRA_OECMAKE += "\
56 -DPY_PYGMENTS_FOUND=OFF \
57 -DPY_PYGMENTS_LEXERS_C_CPP_FOUND=OFF \
58 -DPY_YAML_FOUND=OFF \
59"
60
61EXTRA_OECMAKE:append:class-target = "\
62 -DLLVM_BUILD_TOOLS=OFF \
63 -DLLVM_TABLEGEN=${STAGING_LIBDIR_NATIVE}/llvm-rust/bin/llvm-tblgen \
64 -DLLVM_CONFIG_PATH=${STAGING_LIBDIR_NATIVE}/llvm-rust/bin/llvm-config \
65"
66
67EXTRA_OECMAKE:append:class-nativesdk = "\
68 -DLLVM_BUILD_TOOLS=OFF \
69 -DLLVM_TABLEGEN=${STAGING_LIBDIR_NATIVE}/llvm-rust/bin/llvm-tblgen \
70 -DLLVM_CONFIG_PATH=${STAGING_LIBDIR_NATIVE}/llvm-rust/bin/llvm-config \
71"
72
73# The debug symbols are huge here (>2GB) so suppress them since they
74# provide almost no value. If you really need them then override this
75INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
76
77export YOCTO_ALTERNATE_EXE_PATH = "${STAGING_LIBDIR}/llvm-rust/bin/llvm-config"
78
79do_install:append () {
80 # we don't need any of this stuff to build Rust
81 rm -rf "${D}/usr/lib/cmake"
82}
83
84PACKAGES =+ "${PN}-bugpointpasses ${PN}-llvmhello ${PN}-liblto"
85
86# Add the extra locations to avoid the complaints about unpackaged files
87FILES:${PN}-bugpointpasses = "${libdir}/llvm-rust/lib/BugpointPasses.so"
88FILES:${PN}-llvmhello = "${libdir}/llvm-rust/lib/LLVMHello.so"
89FILES:${PN}-liblto = "${libdir}/llvm-rust/lib/libLTO.so.*"
90FILES:${PN}-staticdev =+ "${libdir}/llvm-rust/*/*.a"
91FILES:${PN} += "${libdir}/libLLVM*.so.* ${libdir}/llvm-rust/lib/*.so.* ${libdir}/llvm-rust/bin"
92FILES:${PN}-dev += "${datadir}/llvm ${libdir}/llvm-rust/lib/*.so ${libdir}/llvm-rust/include ${libdir}/llvm-rust/share ${libdir}/llvm-rust/lib/cmake"
93
94BBCLASSEXTEND = "native nativesdk"