diff mbox series

rust-llvm: remove python3native dependency

Message ID 20231121140607.2660791-1-ross.burton@arm.com
State Accepted, archived
Commit c6971d9d9a9d9a83615508d244778ddc89a94b8a
Headers show
Series rust-llvm: remove python3native dependency | expand

Commit Message

Ross Burton Nov. 21, 2023, 2:06 p.m. UTC
From: Ross Burton <ross.burton@arm.com>

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>
---
 meta/recipes-devtools/rust/rust-llvm_1.70.0.bb | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

Comments

Khem Raj Nov. 21, 2023, 8:50 p.m. UTC | #1
On Tue, Nov 21, 2023 at 6:06 AM Ross Burton <ross.burton@arm.com> wrote:
>
> From: Ross Burton <ross.burton@arm.com>
>
> 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>
> ---
>  meta/recipes-devtools/rust/rust-llvm_1.70.0.bb | 11 ++++++++++-
>  1 file changed, 10 insertions(+), 1 deletion(-)
>
> 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 09e4c65be38..57bbe79cdf1 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 \

is this a full list. or the one that was detected on your build host
installation?

> +"
> +
>  EXTRA_OECMAKE:append:class-target = "\
>      -DLLVM_BUILD_TOOLS=OFF \
>      -DLLVM_TABLEGEN=${STAGING_LIBDIR_NATIVE}/llvm-rust/bin/llvm-tblgen \
> --
> 2.34.1
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#190982): https://lists.openembedded.org/g/openembedded-core/message/190982
> Mute This Topic: https://lists.openembedded.org/mt/102728697/1997914
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [raj.khem@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
Ross Burton Nov. 21, 2023, 9:58 p.m. UTC | #2
On 21 Nov 2023, at 20:50, Khem Raj <raj.khem@gmail.com> wrote:
>> +# 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 \
> 
> is this a full list. or the one that was detected on your build host
> installation?

The full list.

Ross
diff mbox series

Patch

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 09e4c65be38..57bbe79cdf1 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 \