* [PATCH 2/3] clang/llvm: Point lit at the target python for the test suite
2026-11-10 6:16 [PATCH 0/3] clang/llvm: Upgrade to 23.1.5 sunilkumar.dora
2026-11-10 6:16 ` [PATCH 1/3] clang/llvm: Upgrade from 23.1.3 to 23.1.5 release sunilkumar.dora
@ 2026-11-10 6:16 ` sunilkumar.dora
2026-11-10 6:16 ` [PATCH 3/3] oeqa/selftest/clang: Re-enable tests that only needed the target python sunilkumar.dora
2026-11-10 7:48 ` [OE-core] [PATCH 0/3] clang/llvm: Upgrade to 23.1.5 Khem Raj
3 siblings, 0 replies; 5+ messages in thread
From: sunilkumar.dora @ 2026-11-10 6:16 UTC (permalink / raw)
To: openembedded-core
Cc: richard.purdie, sundeep.kokkonda, Randy.MacLeod, sunilkumar.dora,
raj.khem
From: Sunil Dora <sunilkumar.dora@windriver.com>
lit.site.cfg.py records the python cmake found on the build host, but
the test suite runs on the target. Any test calling that python directly
fails there. In llvm the extract_symbols tests, new in 23.1.4, do this
and fail on all the -tc builders. In clang, %deps-to-rsp,
%scan-deps-filter, %hmaptool and %check_analyzer_fixit are built the
same way, which is why the ClangScanDeps tests got excluded in
0e7f898dc4.
Rewrite the recorded path after configure in both recipes. Changing
Python3_EXECUTABLE itself is not an option, cmake.bbclass needs it for
the build.
The extract_symbols config is being changed upstream to use the python
running lit, https://github.com/llvm/llvm-project/pull/240530. That
covers only those two tests though, the clang substitutions and the
other llvm ones still use the configured python, so this is done in the
recipes for all of them rather than by carrying the upstream patch.
Signed-off-by: Sunil Dora <sunilkumar.dora@windriver.com>
---
meta/recipes-devtools/clang/clang_git.bb | 12 ++++++++++++
meta/recipes-devtools/clang/llvm_git.bb | 9 +++++++++
2 files changed, 21 insertions(+)
diff --git a/meta/recipes-devtools/clang/clang_git.bb b/meta/recipes-devtools/clang/clang_git.bb
index 90076f9d6d..6c149945fd 100644
--- a/meta/recipes-devtools/clang/clang_git.bb
+++ b/meta/recipes-devtools/clang/clang_git.bb
@@ -100,6 +100,18 @@ do_configure:prepend() {
ln -srf ${S}/clang-tools-extra ${S}/clang/tools/extra
}
+# The tests run on the target, so lit must use the target python.
+clang_lit_target_python() {
+ sed -i 's|^config.python_executable = .*|config.python_executable = "${bindir}/python3"|' \
+ ${B}/test/lit.site.cfg.py
+}
+
+do_configure:append:class-target() {
+ if [ "${CLANG_ENABLE_TESTSUITE}" = "1" ]; then
+ clang_lit_target_python
+ fi
+}
+
do_install:append() {
oe_multilib_header clang/Config/config.h
}
diff --git a/meta/recipes-devtools/clang/llvm_git.bb b/meta/recipes-devtools/clang/llvm_git.bb
index bec7e93eab..a61ddcb7ef 100644
--- a/meta/recipes-devtools/clang/llvm_git.bb
+++ b/meta/recipes-devtools/clang/llvm_git.bb
@@ -105,8 +105,17 @@ reproducible_build_variables() {
${B}/tools/llvm-config/BuildVariables.inc
}
+# The tests run on the target, so lit must use the target python.
+llvm_lit_target_python() {
+ sed -i 's|^config.python_executable = .*|config.python_executable = "${bindir}/python3"|' \
+ ${B}/test/lit.site.cfg.py
+}
+
do_configure:append:class-target() {
reproducible_build_variables
+ if [ "${CLANG_ENABLE_TESTSUITE}" = "1" ]; then
+ llvm_lit_target_python
+ fi
}
do_configure:append:class-nativesdk() {
reproducible_build_variables
--
2.49.0
^ permalink raw reply related [flat|nested] 5+ messages in thread* [PATCH 3/3] oeqa/selftest/clang: Re-enable tests that only needed the target python
2026-11-10 6:16 [PATCH 0/3] clang/llvm: Upgrade to 23.1.5 sunilkumar.dora
2026-11-10 6:16 ` [PATCH 1/3] clang/llvm: Upgrade from 23.1.3 to 23.1.5 release sunilkumar.dora
2026-11-10 6:16 ` [PATCH 2/3] clang/llvm: Point lit at the target python for the test suite sunilkumar.dora
@ 2026-11-10 6:16 ` sunilkumar.dora
2026-11-10 7:48 ` [OE-core] [PATCH 0/3] clang/llvm: Upgrade to 23.1.5 Khem Raj
3 siblings, 0 replies; 5+ messages in thread
From: sunilkumar.dora @ 2026-11-10 6:16 UTC (permalink / raw)
To: openembedded-core
Cc: richard.purdie, sundeep.kokkonda, Randy.MacLeod, sunilkumar.dora,
raj.khem
From: Sunil Dora <sunilkumar.dora@windriver.com>
These tests were excluded because they run python through lit
substitutions built from config.python_executable: %llvm-locstats,
%llvm-original-di-preservation and UpdateTestChecks in llvm,
%deps-to-rsp, %scan-deps-filter, %hmaptool, %check_analyzer_fixit and
exploded-graph-rewriter in clang. Now that lit uses the target python
they pass on target, 67 in llvm and 99 in clang, on qemux86-64 and
qemux86. The remaining 9 UpdateTestChecks tests are unsupported as they
need an assertions build or the AVR, Lanai or SystemZ targets.
tools/opt-viewer stays excluded, it needs python modules the image does
not have.
Signed-off-by: Sunil Dora <sunilkumar.dora@windriver.com>
---
meta/lib/oeqa/selftest/cases/clang.py | 25 -------------------------
1 file changed, 25 deletions(-)
diff --git a/meta/lib/oeqa/selftest/cases/clang.py b/meta/lib/oeqa/selftest/cases/clang.py
index 93ef781453..e636846e39 100644
--- a/meta/lib/oeqa/selftest/cases/clang.py
+++ b/meta/lib/oeqa/selftest/cases/clang.py
@@ -156,8 +156,6 @@ class LLVMSelfTestSystemEmulated(ClangFamilyBase):
"tools/llvm-cgdata/merge-hashtree-concat\\.test$",
"tools/llvm-cgdata/merge-hashtree-double\\.test$",
"tools/llvm-cgdata/merge-hashtree-single\\.test$",
- "tools/llvm-locstats/locstats\\.ll$",
- "tools/llvm-locstats/no_scope_bytes\\.ll$",
"tools/llvm-objcopy/DXContainer/dump-section\\.yaml$",
"tools/llvm-objcopy/DXContainer/dump-section-priv\\.yaml$",
"tools/llvm-objcopy/ELF/basic-binary-copy\\.test$",
@@ -175,12 +173,9 @@ class LLVMSelfTestSystemEmulated(ClangFamilyBase):
"tools/llvm-objcopy/ELF/strip-sections-only-section\\.test$",
"tools/llvm-objcopy/ELF/strip-sections\\.test$",
"tools/llvm-objcopy/ELF/update-section\\.test$",
- "tools/llvm-original-di-preservation/acceptance-test\\.test$",
- "tools/llvm-original-di-preservation/basic\\.test$",
"tools/llvm-reduce/temporary-files-as-bitcode-split\\.ll$",
"tools/not/disable-symbolization\\.test$",
"tools/opt-viewer/.*",
- "tools/UpdateTestChecks/.*",
"tools/yaml2obj/ELF/custom-fill\\.yaml$",
"tools/yaml2obj/ELF/header-elfdatanone\\.yaml$",
"tools/yaml2obj/ELF/header-sh-fields\\.yaml$",
@@ -239,8 +234,6 @@ class ClangSelfTestSystemEmulated(ClangFamilyBase):
"AST/ByteCode/records\\.cpp$",
"AST/ByteCode/spaceship\\.cpp$",
"AST/ByteCode/unions\\.cpp$",
- "Analysis/dead-stores\\.c$",
- "Analysis/exploded-graph-rewriter/.*",
"Analysis/scan-build/cxx-name\\.test$",
"Analysis/scan-build/deduplication\\.test$",
"Analysis/scan-build/exclude_directories\\.test$",
@@ -250,19 +243,9 @@ class ClangSelfTestSystemEmulated(ClangFamilyBase):
"Analysis/scan-build/plist_output\\.test$",
"Analysis/scan-build/rebuild_index/rebuild_index\\.test$",
"Analysis/scan-build/silence-core-checkers\\.test$",
- "Analysis/virtualcall-fixits\\.cpp$",
"C/C23/n3018\\.c$",
"ClangScanDeps/build-session-validation-outdated-module\\.c$",
"ClangScanDeps/build-session-validation-relocated-modules\\.c$",
- "ClangScanDeps/diagnostics\\.c$",
- "ClangScanDeps/module.*",
- "ClangScanDeps/multiple-commands\\.c$",
- "ClangScanDeps/optimize-vfs-edgecases\\.m$",
- "ClangScanDeps/optimize-vfs-pch\\.m$",
- "ClangScanDeps/prebuilt-modules-in-stable-dirs\\.c$",
- "ClangScanDeps/tu-buffer\\.c$",
- "ClangScanDeps/visible-modules\\.c$",
- "ClangScanDeps/Wsystem-headers-in-module\\.c$",
"CodeGen/builtins\\.c$",
"CodeGen/compound-literal\\.c$",
"CodeGenCUDA/device-const-var-linkage\\.cu$",
@@ -275,15 +258,7 @@ class ClangSelfTestSystemEmulated(ClangFamilyBase):
"Frontend/rewrite-includes-bom\\.c$",
"Interpreter/cxx20-modules\\.cppm$",
"Modules/crash-vfs-umbrella-frameworks\\.m$",
- "Modules/double-quotes\\.m$",
- "Modules/framework-public-includes-private\\.m$",
- "Modules/implicit-module-header-maps\\.cpp$",
"Preprocessor/embed_constexpr\\.c$",
- "Preprocessor/header-search-crash\\.c$",
- "Preprocessor/headermap-rel\\.c$",
- "Preprocessor/headermap-rel2\\.c$",
- "Preprocessor/include-header-missing-in-framework-with-headermap\\.c$",
- "Preprocessor/search-path-usage\\.m$",
"PCH/cxx20-template-args\\.cpp$",
"Sema/arithmetic-fence-builtin\\.c$",
"Sema/atomic-expr\\.c$",
--
2.49.0
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [OE-core] [PATCH 0/3] clang/llvm: Upgrade to 23.1.5
2026-11-10 6:16 [PATCH 0/3] clang/llvm: Upgrade to 23.1.5 sunilkumar.dora
` (2 preceding siblings ...)
2026-11-10 6:16 ` [PATCH 3/3] oeqa/selftest/clang: Re-enable tests that only needed the target python sunilkumar.dora
@ 2026-11-10 7:48 ` Khem Raj
3 siblings, 0 replies; 5+ messages in thread
From: Khem Raj @ 2026-11-10 7:48 UTC (permalink / raw)
To: SunilKumar.Dora
Cc: openembedded-core, richard.purdie, sundeep.kokkonda,
Randy.MacLeod
[-- Attachment #1: Type: text/plain, Size: 3093 bytes --]
This patch looks good to me
On Mon, Nov 9, 2026 at 10:16 PM Dora, Sunil Kumar via openembedded-core
<SunilKumar.Dora=windriver.com@lists.openembedded.org> wrote:
> From: Sunil Dora <sunilkumar.dora@windriver.com>
>
> This moves clang/llvm from 23.1.3 to 23.1.5. All 35 carried patches
> apply as is, nothing they touch changed between the two tags.
>
> 23.1.4 failed the toolchain selftest on all five -tc builders in the two
> new tools/extract_symbols/registry-* tests. Their lit config runs the
> python cmake found at configure time, the build host python, which is
> not there on the target. Other python based tests go through lit's
> %python, the python running lit, so this never showed up before. Clang
> has the same problem in its own substitutions.
>
> Patch 2 rewrites the recorded python path to the target one in both
> recipes when CLANG_ENABLE_TESTSUITE is set. Patch 3 brings back the
> tests excluded only for this reason: 99 pass in clang and 67 in llvm on
> target, the other 9 are UpdateTestChecks tests unsupported in this build.
>
> The extract_symbols config is being fixed upstream in
> https://github.com/llvm/llvm-project/pull/240530, but that covers just
> those two tests. Clang and the other llvm substitutions still use the
> configured python, so the recipe fix covers all of them at once and
> leaves nothing to rebase on the next bump.
>
> Tested locally: clang family, core-image-minimal, spirv-llvm-translator,
> rust and mesa for qemux86-64 glibc; musl family and image; lib32-llvm and
> openmp with multilib; clang and compiler-rt for qemux86, qemuarm and
> qemuarm64. oe-selftest llvm, clang and lld pass on qemux86-64, llvm on
> qemux86. On the autobuilder all five -tc builders (qemux86-64, qemux86,
> qemuarm, qemuarm64, qemuriscv64) pass the llvm, clang and lld selftests
> with the re-enabled tests; multilib, musl-qemuarm64, musl-qemux86 and
> musl-qemux86-64 pass as well.
>
> Sunil Dora (3):
> clang/llvm: Upgrade from 23.1.3 to 23.1.5 release
> clang/llvm: Point lit at the target python for the test suite
> oeqa/selftest/clang: Re-enable tests that only needed the target
> python
>
> meta/conf/distro/include/maintainers.inc | 2 +-
> meta/lib/oeqa/selftest/cases/clang.py | 25 --------------------
> meta/recipes-devtools/clang/clang_git.bb | 12 ++++++++++
> meta/recipes-devtools/clang/common-clang.inc | 2 +-
> meta/recipes-devtools/clang/common.inc | 2 +-
> meta/recipes-devtools/clang/llvm_git.bb | 9 +++++++
> 6 files changed, 24 insertions(+), 28 deletions(-)
>
> --
> 2.49.0
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#249900):
> https://lists.openembedded.org/g/openembedded-core/message/249900
> Mute This Topic: https://lists.openembedded.org/mt/122189926/1997914
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [
> raj.khem@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
>
[-- Attachment #2: Type: text/html, Size: 4321 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread