summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/rust
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@arm.com>2023-11-21 14:06:07 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-11-23 12:46:06 +0000
commitc6971d9d9a9d9a83615508d244778ddc89a94b8a (patch)
treeeb9b162dcbff385feb521a2962166716cf9a25f0 /meta/recipes-devtools/rust
parent3f335913bbbabf48db1749d197c3bfaac9fb7236 (diff)
downloadopenembedded-core-c6971d9d9a9d9a83615508d244778ddc89a94b8a.tar.gz
rust-llvm: remove python3native dependency
LLVM doesn't actually need a native Python3 as the host Python is sufficient, but as it then looks at the host for optional Python dependencies explicitly disable their detection so that rust-llvm remains deterministic. As this is a minimal LLVM for Rust, we don't need the optviewer tool. Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Diffstat (limited to 'meta/recipes-devtools/rust')
-rw-r--r--meta/recipes-devtools/rust/rust-llvm_1.70.0.bb11
1 files changed, 10 insertions, 1 deletions
diff --git a/meta/recipes-devtools/rust/rust-llvm_1.70.0.bb b/meta/recipes-devtools/rust/rust-llvm_1.70.0.bb
index 09e4c65be3..57bbe79cdf 100644
--- a/meta/recipes-devtools/rust/rust-llvm_1.70.0.bb
+++ b/meta/recipes-devtools/rust/rust-llvm_1.70.0.bb
@@ -16,7 +16,7 @@ S = "${RUSTSRC}/src/llvm-project/llvm"
LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=8a15a0759ef07f2682d2ba4b893c9afe"
-inherit cmake python3native
+inherit cmake
DEPENDS += "ninja-native rust-llvm-native"
@@ -47,6 +47,15 @@ EXTRA_OECMAKE = " \
-DLLVM_TARGET_ARCH=${TARGET_ARCH} \
-DCMAKE_INSTALL_PREFIX:PATH=${libdir}/llvm-rust \
"
+
+# Forcibly disable the detection of these packages as otherwise
+# it will look at the host Python install
+EXTRA_OECMAKE += "\
+ -DPY_PYGMENTS_FOUND=OFF \
+ -DPY_PYGMENTS_LEXERS_C_CPP_FOUND=OFF \
+ -DPY_YAML_FOUND=OFF \
+"
+
EXTRA_OECMAKE:append:class-target = "\
-DLLVM_BUILD_TOOLS=OFF \
-DLLVM_TABLEGEN=${STAGING_LIBDIR_NATIVE}/llvm-rust/bin/llvm-tblgen \