Skip to contentSkip to conversation

Oe-selftest for Clang, LLVM, LLD

RFC In review [email protected] 4 participants 10 messages Feb 3 – Feb 15

lore
Share & tools
lore
#0 lore raw

cover Oe-selftest for Clang, LLVM, LLD

From: Deepesh Varatharajan <[email protected]>

This patch series introduces a test framework to run selftests for both native and target builds of Clang, LLVM, and LLD.

Summary of changes:
-Patch 1: Disable clang-tools-extra tests because Clang's CMake cannot
see the llvm-bcanalyzer target.
-Patch 2: Enabled the required CMake flags for clang, llvm & lld tests -Patch 3: Selftest script for Clang, LLVM, and LLD including exclude list -Patch 4: Fix rust build failure by replacing target llvm-config with native

Testing:
1. The test suite has been successfully validated on x86-64, arm64, riscv64, and arm32 for all three components.
2. Clang, LLVM & LLD all together ~80K tests are there and we currently ~200 tests to exclude list which are failing (0.25%).

WIP:
LLVM target tests are currently failing on x86. This is under investigation and will be addressed

Deepesh Varatharajan (4):
clang-tools-extra: disable tests
clang: Enable tests for llvm, clang, lld oeqa/selftest/clang: Add selftest for Clang/LLVM/LLD
rust: Fix rust build failure

 meta/lib/oeqa/selftest/cases/clang.py         | 301 ++++++++++++++++++
 .../0042-guard-clang-tools-extra-test.patch   |  74 +++++
 meta/recipes-devtools/clang/clang_git.bb      |   3 +-
 meta/recipes-devtools/clang/common.inc        |   1 +
 meta/recipes-devtools/clang/lld_git.bb        |   2 +-
 meta/recipes-devtools/clang/llvm_git.bb       |  11 +-
 meta/recipes-devtools/rust/rust_1.92.0.bb     |   5 +-
 7 files changed, 389 insertions(+), 8 deletions(-)
 create mode 100644 meta/lib/oeqa/selftest/cases/clang.py
 create mode 100644 meta/recipes-devtools/clang/clang/0042-guard-clang-tools-extra-test.patch
Signature · 1 line
2.49.0
#1 lore raw

RFC 1/4 clang-tools-extra: disable tests

From: Deepesh Varatharajan <[email protected]>

clang-tools-extra tests depend on the llvm-bcanalyzer CMake target, which exists in LLVM's CMake project but is not visible when Clang is built separately. To run clang tests, disable clang-tools-extra tests for now.

---
 .../0042-guard-clang-tools-extra-test.patch   | 74 +++++++++++++++++++
 meta/recipes-devtools/clang/common.inc        |  1 +
 2 files changed, 75 insertions(+)
 create mode 100644 meta/recipes-devtools/clang/clang/0042-guard-clang-tools-extra-test.patch
meta/recipes-devtools/clang/clang/0042-guard-clang-tools-extra-test.patch new file +74 -0
new file mode 100644
index 0000000000..a37ab65975
@@ -0,0 +1,74 @@
+clang-tools-extra tests depend on the llvm-bcanalyzer CMake target, which
+exists in LLVM's CMake project but is not visible when Clang is built
+separately. To run clang tests, disable clang-tools-extra tests for now.
+
+Without this patch when CLANG_INCLUDE_TESTS is ON got the following error
+
+--------------------------------------------------------------------------------
+| CMake Error at ../clang/21.1.8/recipe-sysroot/usr/lib/cmake/llvm/AddLLVM.cmake:2113 (add_dependencies):
+|   The dependency target "llvm-bcanalyzer" of target
+|   "check-clang-extra-clang-tidy-infrastructure-header-filter-from-config-file-simple"
+|   does not exist.
+| Call Stack (most recent call first):
+|   ../clang/21.1.8/recipe-sysroot/usr/lib/cmake/llvm/AddLLVM.cmake:2221 (add_lit_target)
+|   tools/extra/test/CMakeLists.txt:87 (add_lit_testsuites)
+|
+| CMake Error at ../clang/21.1.8/recipe-sysroot/usr/lib/cmake/llvm/AddLLVM.cmake:2113 (add_dependencies):
+|   The dependency target "llvm-bcanalyzer" of target
+|   "check-clang-extra-modularize" does not exist.
+| Call Stack (most recent call first):
+|   ../clang/21.1.8/recipe-sysroot/usr/lib/cmake/llvm/AddLLVM.cmake:2221 (add_lit_target)
+|   tools/extra/test/CMakeLists.txt:87 (add_lit_testsuites)
+-------------------------------------------------------------------------------
+
+Upstream-Status: Inappropriate [OE-Specific]
+Signed-off-by: Deepesh Varatharajan <[email protected]>
+
+diff --git a/clang-tools-extra/CMakeLists.txt b/clang-tools-extra/CMakeLists.txt
+index 6b6f2b1..26e4c10 100644
+--- a/clang-tools-extra/CMakeLists.txt
++++ b/clang-tools-extra/CMakeLists.txt
+@@ -6,7 +6,7 @@ include(GNUInstallDirs)
+ option(CLANG_TIDY_ENABLE_STATIC_ANALYZER
+   "Include static analyzer checks in clang-tidy" ON)
+
+-if(CLANG_INCLUDE_TESTS)
++if(CLANG_TOOLS_EXTRA_INCLUDE_TESTS)
+   umbrella_lit_testsuite_begin(check-clang-tools)
+
+   option(CLANG_TOOLS_TEST_USE_VG "Run Clang tools' tests under Valgrind" OFF)
+@@ -43,7 +43,7 @@ if (CLANG_ENABLE_CLANGD)
+ endif()
+
+ # Add the common testsuite after all the tools.
+-if(CLANG_INCLUDE_TESTS)
++if(CLANG_TOOLS_EXTRA_INCLUDE_TESTS)
+   add_subdirectory(test)
+   add_subdirectory(unittests)
+   umbrella_lit_testsuite_end(check-clang-tools)
+diff --git a/clang-tools-extra/include-cleaner/CMakeLists.txt b/clang-tools-extra/include-cleaner/CMakeLists.txt
+index dc147f9..4855577 100644
+--- a/clang-tools-extra/include-cleaner/CMakeLists.txt
++++ b/clang-tools-extra/include-cleaner/CMakeLists.txt
+@@ -1,7 +1,7 @@
+ include_directories(include)
+ add_subdirectory(lib)
+ add_subdirectory(tool)
+-if(CLANG_INCLUDE_TESTS)
++if(CLANG_TOOLS_EXTRA_INCLUDE_TESTS)
+   add_subdirectory(test)
+   add_subdirectory(unittests)
+ endif()
+diff --git a/clang-tools-extra/clangd/CMakeLists.txt b/clang-tools-extra/clangd/CMakeLists.txt
+index a1e9da4..94dcb96 100644
+--- a/clang-tools-extra/clangd/CMakeLists.txt
++++ b/clang-tools-extra/clangd/CMakeLists.txt
+@@ -213,7 +213,7 @@ endif()
+ option(CLANGD_BUILD_DEXP "Build the dexp tool as part of Clangd" ON)
+ llvm_canonicalize_cmake_booleans(CLANGD_BUILD_DEXP)
+
+-if(CLANG_INCLUDE_TESTS)
++if(CLANG_TOOLS_EXTRA_INCLUDE_TESTS)
+   add_subdirectory(test)
+   add_subdirectory(unittests)
+ endif()
meta/recipes-devtools/clang/common.inc +1 -0
index 1e70e9c64b..c5f607aa21 100644
@@ -65,6 +65,7 @@ SRC_URI = "\
     file://0001-dont-expose-LLVM_HAVE_OPT_VIEWER_MODULES.patch \
     file://0001-clang-Support-building-native-tools-when-cross-compi.patch \
     file://clang-no-tblgen.patch \
+    file://0042-guard-clang-tools-extra-test.patch \
 "
 # Fallback to no-PIE if not set
 GCCPIE ??= ""
Signature · 1 line
2.49.0
#2 lore raw

RFC 2/4 clang: Enable tests for llvm, clang, lld

In reply to [email protected]

From: Deepesh Varatharajan <[email protected]>

Enable the required LLVM, Clang, and LLD test build flags for both native and target builds, and install the LLVM target tools needed to run tests via llvm-lit.

---
 meta/recipes-devtools/clang/clang_git.bb |  3 ++-
 meta/recipes-devtools/clang/lld_git.bb   |  2 +-
 meta/recipes-devtools/clang/llvm_git.bb  | 11 +++++++----
 3 files changed, 10 insertions(+), 6 deletions(-)
meta/recipes-devtools/clang/clang_git.bb +2 -1
index e10c327a2a..a1ff25f863 100644
@@ -68,7 +68,8 @@ EXTRA_OECMAKE += "-DLLVM_ENABLE_ASSERTIONS=OFF \
                   -DLLVM_NATIVE_TOOL_DIR=${STAGING_BINDIR_NATIVE} \
                   -DLLVM_TABLEGEN_EXE=${STAGING_BINDIR_NATIVE}/llvm-tblgen \
                   -DCLANG_TABLEGEN_EXE=${STAGING_BINDIR_NATIVE}/clang-tblgen \
-                  -DLLVM_INCLUDE_TESTS=OFF \
+                  -DCLANG_INCLUDE_TESTS=ON \
+                  -DLLVM_INCLUDE_TESTS=ON \
                   -DCROSS_TOOLCHAIN_FLAGS_NATIVE='-DCMAKE_TOOLCHAIN_FILE=${WORKDIR}/toolchain-native.cmake' \
                   -DLLVM_LIBDIR_SUFFIX=${LLVM_LIBDIR_SUFFIX} \
                   -DCMAKE_AR=${STAGING_BINDIR_NATIVE}/llvm-ar \
meta/recipes-devtools/clang/lld_git.bb +1 -1
index ba36942790..1d3d80e117 100644
@@ -16,7 +16,7 @@ OECMAKE_SOURCEPATH = "${S}/lld"
 
 # Explicitly enable symlinks as the lld build doesn't call into the llvm setup
 # and turn that on.
-EXTRA_OECMAKE += "-DLLVM_INCLUDE_TESTS=OFF -DLLVM_USE_SYMLINKS=ON \
+EXTRA_OECMAKE += "-DLLVM_INCLUDE_TESTS=ON -DLLVM_USE_SYMLINKS=ON \
                   -DLLVM_TABLEGEN_EXE=${STAGING_BINDIR_NATIVE}/llvm-tblgen"
 
 BBCLASSEXTEND = "native nativesdk"
meta/recipes-devtools/clang/llvm_git.bb +7 -4
index 96ea383731..6fed382d69 100644
@@ -44,10 +44,13 @@ EXTRA_OECMAKE += "-DCMAKE_BUILD_TYPE=MinSizeRel \
                   -DLLVM_LIBDIR_SUFFIX=${LLVM_LIBDIR_SUFFIX} \
                   -DLLVM_VERSION_SUFFIX='${VER_SUFFIX}' \
                   -DLLVM_TEMPORARILY_ALLOW_OLD_TOOLCHAIN=ON \
-                  -DLLVM_INCLUDE_TESTS=OFF \
+                  -DLLVM_INCLUDE_TESTS=ON \
+                  -DLLVM_BUILD_TESTS=ON \
+                  -DLLVM_INSTALL_GTEST=ON \
                   -DLLVM_INCLUDE_EXAMPLES=OFF \
-                  -DLLVM_TOOL_OBJ2YAML_BUILD=OFF \
-                  -DLLVM_TOOL_YAML2OBJ_BUILD=OFF \
+                  -DLLVM_TOOL_OBJ2YAML_BUILD=ON \
+                  -DLLVM_TOOL_YAML2OBJ_BUILD=ON \
+                  -DLLVM_TOOL_LLVM_EXEGESIS_BUILD=ON \
                   -DLLVM_NATIVE_TOOL_DIR=${STAGING_BINDIR_NATIVE} \
                   -DLLVM_TABLEGEN=${STAGING_BINDIR_NATIVE}/llvm-tblgen \
                   -DCROSS_TOOLCHAIN_FLAGS_NATIVE='-DCMAKE_TOOLCHAIN_FILE=${WORKDIR}/toolchain-native.cmake' \
@@ -69,7 +72,6 @@ PACKAGECONFIG ??= "eh rtti shared-libs ${@bb.utils.filter('DISTRO_FEATURES', 'lt
 PACKAGECONFIG:remove:class-native = "lto thin-lto"
 
 PACKAGECONFIG[eh] = "-DLLVM_ENABLE_EH=ON,-DLLVM_ENABLE_EH=OFF"
-PACKAGECONFIG[exegesis] = "-DLLVM_TOOL_LLVM_EXEGESIS_BUILD=ON,-DLLVM_TOOL_LLVM_EXEGESIS_BUILD=OFF"
 PACKAGECONFIG[libedit] = "-DLLVM_ENABLE_LIBEDIT=ON,-DLLVM_ENABLE_LIBEDIT=OFF,libedit"
 PACKAGECONFIG[rtti] = "-DLLVM_ENABLE_RTTI=ON,-DLLVM_ENABLE_RTTI=OFF"
 PACKAGECONFIG[shared-libs] = "-DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_LINK_LLVM_DYLIB=ON,-DLLVM_BUILD_LLVM_DYLIB=OFF -DLLVM_LINK_LLVM_DYLIB=OFF"
@@ -124,6 +126,7 @@ SYSROOT_PREPROCESS_FUNCS:append:class-nativesdk = " llvm_sysroot_preprocess"
 llvm_sysroot_preprocess() {
         install -d ${SYSROOT_DESTDIR}${bindir_crossscripts}/
         install -m 0755 ${S}/llvm/tools/llvm-config/llvm-config ${SYSROOT_DESTDIR}${bindir_crossscripts}/
+        install -m 0755 ${B}/bin/* ${SYSROOT_DESTDIR}${bindir}/
 }
 
 FILES:${PN}-dev += "${libdir}/llvm-config"
Signature · 1 line
2.49.0
#3 lore raw

RE: [OE-core] [RFC 2/4] clang: Enable tests for llvm, clang, lld

Quoted 86 lines

-----Original Message-----
From: [email protected] <[email protected]> On Behalf Of Varatharajan, Deepesh via lists.openembedded.org
Sent: den 3 februari 2026 15:03
To: [email protected]
Cc: [email protected]; [email protected]; [email protected]
Subject: [OE-core] [RFC 2/4] clang: Enable tests for llvm, clang, lld

From: Deepesh Varatharajan <[email protected]>

Enable the required LLVM, Clang, and LLD test build flags for both native and target builds, and install the LLVM target tools needed to run tests via llvm-lit.

---
 meta/recipes-devtools/clang/clang_git.bb |  3 ++-
 meta/recipes-devtools/clang/lld_git.bb   |  2 +-
 meta/recipes-devtools/clang/llvm_git.bb  | 11 +++++++----
 3 files changed, 10 insertions(+), 6 deletions(-)
meta/recipes-devtools/clang/clang_git.bb +2 -1
index e10c327a2a..a1ff25f863 100644
@@ -68,7 +68,8 @@ EXTRA_OECMAKE += "-DLLVM_ENABLE_ASSERTIONS=OFF \
                   -DLLVM_NATIVE_TOOL_DIR=${STAGING_BINDIR_NATIVE} \
                   -DLLVM_TABLEGEN_EXE=${STAGING_BINDIR_NATIVE}/llvm-tblgen \
                   -DCLANG_TABLEGEN_EXE=${STAGING_BINDIR_NATIVE}/clang-tblgen \
-                  -DLLVM_INCLUDE_TESTS=OFF \
+                  -DCLANG_INCLUDE_TESTS=ON \
+                  -DLLVM_INCLUDE_TESTS=ON \
                   -DCROSS_TOOLCHAIN_FLAGS_NATIVE='-DCMAKE_TOOLCHAIN_FILE=${WORKDIR}/toolchain-native.cmake' \
                   -DLLVM_LIBDIR_SUFFIX=${LLVM_LIBDIR_SUFFIX} \
                   -DCMAKE_AR=${STAGING_BINDIR_NATIVE}/llvm-ar \
meta/recipes-devtools/clang/lld_git.bb +1 -1
index ba36942790..1d3d80e117 100644
@@ -16,7 +16,7 @@ OECMAKE_SOURCEPATH = "${S}/lld"
 
 # Explicitly enable symlinks as the lld build doesn't call into the llvm setup
 # and turn that on.
-EXTRA_OECMAKE += "-DLLVM_INCLUDE_TESTS=OFF -DLLVM_USE_SYMLINKS=ON \
+EXTRA_OECMAKE += "-DLLVM_INCLUDE_TESTS=ON -DLLVM_USE_SYMLINKS=ON \
                   -DLLVM_TABLEGEN_EXE=${STAGING_BINDIR_NATIVE}/llvm-tblgen"
 
 BBCLASSEXTEND = "native nativesdk"
meta/recipes-devtools/clang/llvm_git.bb +6 -3
index 96ea383731..6fed382d69 100644
@@ -44,10 +44,13 @@ EXTRA_OECMAKE += "-DCMAKE_BUILD_TYPE=MinSizeRel \
                   -DLLVM_LIBDIR_SUFFIX=${LLVM_LIBDIR_SUFFIX} \
                   -DLLVM_VERSION_SUFFIX='${VER_SUFFIX}' \
                   -DLLVM_TEMPORARILY_ALLOW_OLD_TOOLCHAIN=ON \
-                  -DLLVM_INCLUDE_TESTS=OFF \
+                  -DLLVM_INCLUDE_TESTS=ON \
+                  -DLLVM_BUILD_TESTS=ON \
+                  -DLLVM_INSTALL_GTEST=ON \
                   -DLLVM_INCLUDE_EXAMPLES=OFF \
-                  -DLLVM_TOOL_OBJ2YAML_BUILD=OFF \
-                  -DLLVM_TOOL_YAML2OBJ_BUILD=OFF \
+                  -DLLVM_TOOL_OBJ2YAML_BUILD=ON \
+                  -DLLVM_TOOL_YAML2OBJ_BUILD=ON \
+                  -DLLVM_TOOL_LLVM_EXEGESIS_BUILD=ON \
                   -DLLVM_NATIVE_TOOL_DIR=${STAGING_BINDIR_NATIVE} \
                   -DLLVM_TABLEGEN=${STAGING_BINDIR_NATIVE}/llvm-tblgen \
                   -DCROSS_TOOLCHAIN_FLAGS_NATIVE='-DCMAKE_TOOLCHAIN_FILE=${WORKDIR}/toolchain-native.cmake' \
@@ -69,7 +72,6 @@ PACKAGECONFIG ??= "eh rtti shared-libs

${@bb.utils.filter('DISTRO_FEATURES', 'lt
PACKAGECONFIG:remove:class-native = "lto thin-lto"

PACKAGECONFIG[eh] = "-DLLVM_ENABLE_EH=ON,-DLLVM_ENABLE_EH=OFF"

meta/recipes-devtools/clang/llvm_git.bb +1 -2
-PACKAGECONFIG[exegesis] = "-DLLVM_TOOL_LLVM_EXEGESIS_BUILD=ON,-DLLVM_TOOL_LLVM_EXEGESIS_BUILD=OFF"
 PACKAGECONFIG[libedit] = "-DLLVM_ENABLE_LIBEDIT=ON,-DLLVM_ENABLE_LIBEDIT=OFF,libedit"
 PACKAGECONFIG[rtti] = "-DLLVM_ENABLE_RTTI=ON,-DLLVM_ENABLE_RTTI=OFF"
 PACKAGECONFIG[shared-libs] = "-DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_LINK_LLVM_DYLIB=ON,-DLLVM_BUILD_LLVM_DYLIB=OFF -DLLVM_LINK_LLVM_DYLIB=OFF"
@@ -124,6 +126,7 @@ SYSROOT_PREPROCESS_FUNCS:append:class-nativesdk = " llvm_sysroot_preprocess"
 llvm_sysroot_preprocess() {
         install -d ${SYSROOT_DESTDIR}${bindir_crossscripts}/
         install -m 0755 ${S}/llvm/tools/llvm-config/llvm-config ${SYSROOT_DESTDIR}${bindir_crossscripts}/
+        install -m 0755 ${B}/bin/* ${SYSROOT_DESTDIR}${bindir}/
 }
 
 FILES:${PN}-dev += "${libdir}/llvm-config"
--
Quoted 1 line

2.49.0

Will this noticeably affect build times? Because we never run the selftests in our environment so if it does, we would very much like to be able to turn this off.

//Peter

#4 lore raw

Re: [OE-core] [RFC 2/4] clang: Enable tests for llvm, clang, lld

Quoted 87 lines · Peter Kjellerstedt

CAUTION: This email comes from a non Wind River email account!
Do not click links or open attachments unless you recognize the sender and know the content is safe.

Quoted 84 lines

-----Original Message-----
From: [email protected] <[email protected]> On Behalf Of Varatharajan, Deepesh via lists.openembedded.org
Sent: den 3 februari 2026 15:03
To: [email protected]
Cc: [email protected]; [email protected]; [email protected]
Subject: [OE-core] [RFC 2/4] clang: Enable tests for llvm, clang, lld

From: Deepesh Varatharajan <[email protected]>

Enable the required LLVM, Clang, and LLD test build flags for both native and target builds, and install the LLVM target tools needed to run tests via llvm-lit.

---
  meta/recipes-devtools/clang/clang_git.bb |  3 ++-
  meta/recipes-devtools/clang/lld_git.bb   |  2 +-
  meta/recipes-devtools/clang/llvm_git.bb  | 11 +++++++----
  3 files changed, 10 insertions(+), 6 deletions(-)
meta/recipes-devtools/clang/clang_git.bb +2 -1
index e10c327a2a..a1ff25f863 100644
@@ -68,7 +68,8 @@ EXTRA_OECMAKE += "-DLLVM_ENABLE_ASSERTIONS=OFF \
                    -DLLVM_NATIVE_TOOL_DIR=${STAGING_BINDIR_NATIVE} \
                    -DLLVM_TABLEGEN_EXE=${STAGING_BINDIR_NATIVE}/llvm-tblgen \
                    -DCLANG_TABLEGEN_EXE=${STAGING_BINDIR_NATIVE}/clang-tblgen \
-                  -DLLVM_INCLUDE_TESTS=OFF \
+                  -DCLANG_INCLUDE_TESTS=ON \
+                  -DLLVM_INCLUDE_TESTS=ON \
                    -DCROSS_TOOLCHAIN_FLAGS_NATIVE='-DCMAKE_TOOLCHAIN_FILE=${WORKDIR}/toolchain-native.cmake' \
                    -DLLVM_LIBDIR_SUFFIX=${LLVM_LIBDIR_SUFFIX} \
                    -DCMAKE_AR=${STAGING_BINDIR_NATIVE}/llvm-ar \
meta/recipes-devtools/clang/lld_git.bb +1 -1
index ba36942790..1d3d80e117 100644
@@ -16,7 +16,7 @@ OECMAKE_SOURCEPATH = "${S}/lld"
 
  # Explicitly enable symlinks as the lld build doesn't call into the llvm setup
  # and turn that on.
-EXTRA_OECMAKE += "-DLLVM_INCLUDE_TESTS=OFF -DLLVM_USE_SYMLINKS=ON \
+EXTRA_OECMAKE += "-DLLVM_INCLUDE_TESTS=ON -DLLVM_USE_SYMLINKS=ON \
                    -DLLVM_TABLEGEN_EXE=${STAGING_BINDIR_NATIVE}/llvm-tblgen"
 
  BBCLASSEXTEND = "native nativesdk"
meta/recipes-devtools/clang/llvm_git.bb +6 -3
index 96ea383731..6fed382d69 100644
@@ -44,10 +44,13 @@ EXTRA_OECMAKE += "-DCMAKE_BUILD_TYPE=MinSizeRel \
                    -DLLVM_LIBDIR_SUFFIX=${LLVM_LIBDIR_SUFFIX} \
                    -DLLVM_VERSION_SUFFIX='${VER_SUFFIX}' \
                    -DLLVM_TEMPORARILY_ALLOW_OLD_TOOLCHAIN=ON \
-                  -DLLVM_INCLUDE_TESTS=OFF \
+                  -DLLVM_INCLUDE_TESTS=ON \
+                  -DLLVM_BUILD_TESTS=ON \
+                  -DLLVM_INSTALL_GTEST=ON \
                    -DLLVM_INCLUDE_EXAMPLES=OFF \
-                  -DLLVM_TOOL_OBJ2YAML_BUILD=OFF \
-                  -DLLVM_TOOL_YAML2OBJ_BUILD=OFF \
+                  -DLLVM_TOOL_OBJ2YAML_BUILD=ON \
+                  -DLLVM_TOOL_YAML2OBJ_BUILD=ON \
+                  -DLLVM_TOOL_LLVM_EXEGESIS_BUILD=ON \
                    -DLLVM_NATIVE_TOOL_DIR=${STAGING_BINDIR_NATIVE} \
                    -DLLVM_TABLEGEN=${STAGING_BINDIR_NATIVE}/llvm-tblgen \
                    -DCROSS_TOOLCHAIN_FLAGS_NATIVE='-DCMAKE_TOOLCHAIN_FILE=${WORKDIR}/toolchain-native.cmake' \
@@ -69,7 +72,6 @@ PACKAGECONFIG ??= "eh rtti shared-libs

${@bb.utils.filter('DISTRO_FEATURES', 'lt
PACKAGECONFIG:remove:class-native = "lto thin-lto"

PACKAGECONFIG[eh] = "-DLLVM_ENABLE_EH=ON,-DLLVM_ENABLE_EH=OFF"

meta/recipes-devtools/clang/llvm_git.bb +1 -1
-PACKAGECONFIG[exegesis] = "-DLLVM_TOOL_LLVM_EXEGESIS_BUILD=ON,-DLLVM_TOOL_LLVM_EXEGESIS_BUILD=OFF"
  PACKAGECONFIG[libedit] = "-DLLVM_ENABLE_LIBEDIT=ON,-DLLVM_ENABLE_LIBEDIT=OFF,libedit"
  PACKAGECONFIG[rtti] = "-DLLVM_ENABLE_RTTI=ON,-DLLVM_ENABLE_RTTI=OFF"
  PACKAGECONFIG[shared-libs] = "-DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_LINK_LLVM_DYLIB=ON,-DLLVM_BUILD_LLVM_DYLIB=OFF -DLLVM_LINK_LLVM_DYLIB=OFF"
@@ -124,6 +126,7 @@ SYSROOT_PREPROCESS_FUNCS:append:class-nativesdk = " llvm_sysroot_preprocess"
  llvm_sysroot_preprocess() {
          install -d ${SYSROOT_DESTDIR}${bindir_crossscripts}/
          install -m 0755 ${S}/llvm/tools/llvm-config/llvm-config ${SYSROOT_DESTDIR}${bindir_crossscripts}/
+        install -m 0755 ${B}/bin/* ${SYSROOT_DESTDIR}${bindir}/
  }
 
Quoted 8 lines
Quoted 3 lines
meta/recipes-devtools/clang/llvm_git.bb +0 -1
  FILES:${PN}-dev += "${libdir}/llvm-config"
--

2.49.0

Will this noticeably affect build times? Because we never run the selftests in our environment so if it does, we would very much like to be able to turn this off.

//Peter

Hi Peter,

We’ve measured this over multiple runs without using the poky sstate, and the impact on overall build time is minimal. Comparing before and after the change:

llvm increased by ~50 seconds
clang increased by ~15 seconds
lld increased by ~1 second

Regards,
Deepesh

Quoted 1 line
#5 lore raw

RFC 3/4 oeqa/selftest/clang: Add selftest for Clang/LLVM/LLD

In reply to [email protected]

From: Deepesh Varatharajan <[email protected]>

Add selftests to validate LLVM, Clang, and LLD test suites using llvm-lit for both native and target builds.

The tests cover:
- Native llvm, clang, and lld using llvm-lit
- Target-side execution under QEMU via NFS using llvm-lit
- Architecture and OS-specific test filtering
- Known failing test exclusions

---
 meta/lib/oeqa/selftest/cases/clang.py | 301 ++++++++++++++++++++++++++
 1 file changed, 301 insertions(+)
 create mode 100644 meta/lib/oeqa/selftest/cases/clang.py
meta/lib/oeqa/selftest/cases/clang.py new file +301 -0
new file mode 100644
index 0000000000..a13bb8eae2
@@ -0,0 +1,301 @@
+#
+# Copyright (c) 2026 by Wind River Systems, Inc.
+#
+# SPDX-License-Identifier: MIT
+#
+import time
+import contextlib
+import subprocess
+from oeqa.core.decorator import OETestTag
+from oeqa.selftest.case import OESelftestTestCase
+from oeqa.utils.commands import bitbake, get_bb_var, runqemu
+from oeqa.utils.nfs import unfs_server
+
+class ClangFamilyBase(OESelftestTestCase):
+
+    ALL_ARCHS = [
+        "aarch64", "arm", "i386", "x86_64", "x86",
+        "mips", "riscv", "riscv64", "ppc", "ppc64",
+        "hexagon", "sparc", "sparcv9", "msp430",
+        "loongarch"
+    ]
+
+    EXCLUDE_OS = [
+        "Mac", "macho", "Darwin", "OSX", "wasm",
+        "Windows", "Win", "MinGW", "COFF", "zos",
+        "FreeBSD", "aix", "fuchsia", "ve"
+    ]
+
+class ClangFamilyNativeSelfTest(ClangFamilyBase):
+
+    def test_clang_family_native(self):
+        recipes = ["llvm-native", "clang-native", "lld-native"]
+        host_arch = get_bb_var("HOST_ARCH")
+
+        for recipe in recipes:
+            bitbake(recipe)
+            workdir = get_bb_var("WORKDIR", recipe)
+            build_dir = get_bb_var("B", recipe)
+            staging_dir_native = get_bb_var("STAGING_DIR_NATIVE")
+            test_dir = f"{build_dir}/test"
+            result_log = f"{workdir}/temp/{recipe}-results.log"
+            result_sum = f"{workdir}/temp/tests.sum"
+            lit_bin = f"{build_dir}/bin/llvm-lit"
+            arches = [a for a in self.ALL_ARCHS if a != host_arch]
+            filter_out = "|".join(arches + self.EXCLUDE_OS)
+            env = os.environ.copy()
+            env["LD_LIBRARY_PATH"] = f"{build_dir}/lib:{staging_dir_native}/usr/lib:{env.get('LD_LIBRARY_PATH', '')}"
+
+            cmd = f"{lit_bin} --filter-out '{filter_out}' '{test_dir}' -o '{result_log}'"
+
+            with open(result_sum, "w") as f:
+                try:
+                    subprocess.run(cmd, shell=True, check=True, env=env, stdout=f)
+                except subprocess.CalledProcessError as e:
+                    raise AssertionError(
+                        f"{recipe} llvm-lit failed — see {result_log} for details"
+                    )
+
+class ClangFamilyTargetBase(ClangFamilyBase):
+
+    DEFAULT_PACKAGES = [
+        "bash",
+        "libgcc",
+        "libstdc++",
+        "llvm",
+        "python3",
+        "python3-core",
+        "python3-modules",
+        "nfs-utils",
+        "grep",
+        "sed",
+        "findutils",
+        "cpio",
+        "which",
+    ]
+
+    def setUp(self):
+        super().setUp()
+        self.target_arch = get_bb_var("TARGET_ARCH")
+        self.tmpdir = get_bb_var("TMPDIR")
+        arches = [a for a in self.ALL_ARCHS if a != self.target_arch]
+        self.filter_out = "|".join(arches + self.EXCLUDE_OS)
+
+    def build_core_image(self):
+        features = [
+            'IMAGE_FEATURES += "ssh-server-openssh"',
+            'CORE_IMAGE_EXTRA_INSTALL += "{}"'.format(" ".join(self.DEFAULT_PACKAGES))
+        ]
+        self.write_config("\n".join(features))
+        bitbake("core-image-minimal")
+
+    def start_qemu_nfs(self):
+        ctx = contextlib.ExitStack()
+        s = ctx.__enter__()
+        nfsport, mountport = s.enter_context(unfs_server(self.tmpdir, udp=False))
+        qemu = s.enter_context(
+            runqemu("core-image-minimal", runqemuparams="nographic", qemuparams="-m 2048")
+        )
+
+        status, _ = qemu.run("uname")
+        if status != 0:
+            raise AssertionError("QEMU SSH check failed")
+
+        status, _ = qemu.run(f"mkdir -p {self.tmpdir}")
+        if status != 0:
+            raise AssertionError("Failed to create TMPDIR on target")
+
+        mountcmd = (
+            f"mount -o noac,nfsvers=3,port={nfsport},mountport={mountport} "
+            f"\"{qemu.server_ip}:{self.tmpdir}\" \"{self.tmpdir}\""
+        )
+        status, output = qemu.run(mountcmd)
+        if status != 0:
+            raise AssertionError(f"NFS mount failed: {output}")
+        return ctx, qemu
+
+    def run_llvm_lit(self, recipe, extra_filter=None, timeout=None):
+        build_dir = get_bb_var("B", recipe)
+        workdir = get_bb_var("WORKDIR", recipe)
+        lit_bin = f"{build_dir}/bin/llvm-lit"
+        test_dir = f"{build_dir}/test"
+        guest_result = f"/tmp/{recipe}-target-results.json"
+        host_result = f"{workdir}/{recipe}-target-results.log"
+
+        filter_regex = self.filter_out
+        if extra_filter:
+            filter_regex += "|" + "|".join(extra_filter)
+
+        cmd = (
+             f"cd {build_dir}/bin && "
+             f"python3 ./llvm-lit --filter-out '{filter_regex}' ../test -o {guest_result}"
+        )
+
+        return cmd, guest_result, host_result
+
+@OETestTag("toolchain-system")
+@OETestTag("toolchain-user")
+@OETestTag("runqemu")
+class LLVMSelfTestSystemEmulated(ClangFamilyTargetBase):
+
+    LLVM_EXTRA_EXCLUDE = [
+        "BugPoint/compile-custom\\.ll$",
+        "BugPoint/replace-funcs-with-null\\.ll$",
+        "CodeGen/AMDGPU/lds-run-twice-absolute-md\\.ll$",
+        "CodeGen/AMDGPU/lds-run-twice\\.ll$",
+        "CodeGen/Generic/fp128-math-libcalls\\.ll$",
+        "CodeGen/Thumb/2009-08-20-ISelBug\\.ll$",
+        "CodeGen/Thumb/2010-07-15-debugOrdering\\.ll$",
+        "CodeGen/Thumb/2014-06-10-thumb1-ldst-opt-bug\\.ll$",
+        "CodeGen/Thumb/PR17309\\.ll$",
+        "CodeGen/Thumb/dyn-stackalloc\\.ll$",
+        "CodeGen/Thumb/frame-access\\.ll$",
+        "CodeGen/Thumb/ldm-merge-call\\.ll$",
+        "CodeGen/Thumb/pop\\.ll$",
+        "CodeGen/Thumb/pr35836\\.ll$",
+        "CodeGen/Thumb/pr35836_2\\.ll$",
+        "CodeGen/Thumb/smul_fix\\.ll$",
+        "CodeGen/Thumb/stack-guard-xo\\.ll$",
+        "CodeGen/Thumb/stm-deprecated\\.ll$",
+        "CodeGen/Thumb/stm-merge\\.ll$",
+        "CodeGen/Thumb/thumb-ldm\\.ll$",
+        "CodeGen/Thumb/ucmp\\.ll$",
+        "CodeGen/Thumb/vargs\\.ll$",
+        "CodeGen/Thumb2/2009-08-21-PostRAKill4\\.ll$",
+        "CodeGen/Thumb2/2009-09-01-PostRAProlog\\.ll$",
+        "CodeGen/Thumb2/constant-islands\\.ll$",
+        "CodeGen/Thumb2/ldr-str-imm12\\.ll$",
+        "CodeGen/Thumb2/pacbti-m-varargs-1\\.ll$",
+        "CodeGen/Thumb2/pacbti-m-varargs-2\\.ll$",
+        "CodeGen/Thumb2/thumb2-ldm\\.ll$",
+        "Other/spirv-sim/.*",
+        "Transforms/LoopLoadElim/.*",
+        "tools/llvm-cgdata/merge-combined-funcmap-hashtree\\.test$",
+        "tools/llvm-cgdata/merge-funcmap-concat\\.test$",
+        "tools/llvm-cgdata/merge-funcmap-double\\.test$",
+        "tools/llvm-cgdata/merge-funcmap-single\\.test$",
+        "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/ELF/basic-binary-copy\\.test$",
+        "tools/llvm-objcopy/ELF/binary-first-seg-offset-zero\\.test$",
+        "tools/llvm-objcopy/ELF/binary-no-paddr\\.test$",
+        "tools/llvm-objcopy/ELF/binary-paddr\\.test$",
+        "tools/llvm-objcopy/ELF/binary-segment-layout\\.test$",
+        "tools/llvm-objcopy/ELF/check-addr-offset-align-binary\\.test$",
+        "tools/llvm-objcopy/ELF/dump-section\\.test$",
+        "tools/llvm-objcopy/ELF/gap-fill\\.test$",
+        "tools/llvm-objcopy/ELF/pad-to\\.test$",
+        "tools/llvm-objcopy/ELF/parent-loop-check\\.test$",
+        "tools/llvm-objcopy/ELF/strip-all-gnu\\.test$",
+        "tools/llvm-objcopy/ELF/strip-sections-keep\\.test$",
+        "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/basic\\.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$",
+        "tools/yaml2obj/GOFF/GOFF-header-end\\.yaml$",
+        "tools/yaml2obj/GOFF/GOFF-header-settings\\.yaml$",
+    ]
+
+    def test_llvm(self):
+        bitbake("llvm")
+        self.build_core_image()
+        ctx, qemu = self.start_qemu_nfs()
+        with ctx:
+            cmd, guest_result, host_result = self.run_llvm_lit(
+                "llvm", extra_filter=self.LLVM_EXTRA_EXCLUDE
+            )
+            status, output = qemu.run(cmd, timeout=3600)
+            if status != 0:
+                raise AssertionError(f"llvm-lit failed for LLVM: {output}")
+            status, _ = qemu.run(f"cp {guest_result} {host_result}")
+            if status != 0:
+                raise AssertionError("Failed to copy LLVM lit results back to host")
+
+@OETestTag("toolchain-system")
+@OETestTag("toolchain-user")
+@OETestTag("runqemu")
+class ClangSelfTestSystemEmulated(ClangFamilyTargetBase):
+
+    CLANG_EXTRA_EXCLUDE = [
+        "APINotes/yaml-roundtrip-2\\.test$",
+        "APINotes/yaml-roundtrip\\.test$",
+        "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$",
+        "Analysis/scan-build/help\\.test$",
+        "Analysis/scan-build/html_output\\.test$",
+        "Analysis/scan-build/plist_html_output\\.test$",
+        "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$",
+        "ClangScanDeps/module.*",
+        "ClangScanDeps/multiple-commands\\.c$",
+        "ClangScanDeps/optimize-vfs-edgecases\\.m$",
+        "ClangScanDeps/optimize-vfs-pch\\.m$",
+        "ClangScanDeps/visible-modules\\.c$",
+        "ClangScanDeps/Wsystem-headers-in-module\\.c$",
+        "Format/docs_updated\\.test$",
+        "Interpreter/cxx20-modules\\.cppm$",
+        "Modules/double-quotes\\.m$",
+        "Modules/framework-public-includes-private\\.m$",
+        "Modules/implicit-module-header-maps\\.cpp$",
+        "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$",
+    ]
+
+    def test_clang(self):
+        bitbake("clang")
+        self.build_core_image()
+        ctx, qemu = self.start_qemu_nfs()
+        with ctx:
+            cmd, guest_result, host_result = self.run_llvm_lit(
+                "clang", extra_filter=self.CLANG_EXTRA_EXCLUDE
+            )
+            status, output = qemu.run(cmd, timeout=3600)
+            if status != 0:
+                raise AssertionError(f"llvm-lit failed for Clang: {output}")
+            status, _ = qemu.run(f"cp {guest_result} {host_result}")
+            if status != 0:
+                raise AssertionError("Failed to copy Clang lit results back to host")
+
+@OETestTag("toolchain-system")
+@OETestTag("toolchain-user")
+@OETestTag("runqemu")
+class LLDSelfTestSystemEmulated(ClangFamilyTargetBase):
+
+    LLD_EXTRA_EXCLUDE = [
+        "ELF/fill-trap\\.s$",
+        "ELF/oformat-binary-ttext\\.s$",
+        "ELF/oformat-binary\\.s$",
+        "ELF/partition-synthetic-sections\\.s$",
+        "ELF/reproduce\\.s$",
+    ]
+
+    def test_lld(self):
+        bitbake("lld")
+        self.build_core_image()
+        ctx, qemu = self.start_qemu_nfs()
+        with ctx:
+            cmd, guest_result, host_result = self.run_llvm_lit(
+                "lld", extra_filter=self.LLD_EXTRA_EXCLUDE
+            )
+            status, output = qemu.run(cmd, timeout=3600)
+            if status != 0:
+                raise AssertionError(f"llvm-lit failed for LLD: {output}")
+            status, _ = qemu.run(f"cp {guest_result} {host_result}")
+            if status != 0:
+                raise AssertionError("Failed to copy LLD lit results back to host")
Signature · 1 line
2.49.0
#6 lore raw

RFC 4/4 rust: Fix rust build failure

In reply to [email protected]

From: Deepesh Varatharajan <[email protected]>

Target LLVM tools are installed in the sysroot for llvm-lit, which causes Rust to pick up a target llvm-config that cannot run on the host. Overwrite it with the native llvm-config so Rust can execute it correctly.

---
 meta/recipes-devtools/rust/rust_1.92.0.bb | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
meta/recipes-devtools/rust/rust_1.92.0.bb +3 -2
index a25f65f674..b1d8597056 100644
@@ -234,9 +234,10 @@ rust_runx () {
 
     # Copy the natively built llvm-config into the target so we can run it. Horrible,
     # but works!
-    if [ ${RUST_ALTERNATE_EXE_PATH_NATIVE} != ${RUST_ALTERNATE_EXE_PATH} -a ! -f ${RUST_ALTERNATE_EXE_PATH} ]; then
+    if [ ${RUST_ALTERNATE_EXE_PATH_NATIVE} != ${RUST_ALTERNATE_EXE_PATH} ]; then
         mkdir -p `dirname ${RUST_ALTERNATE_EXE_PATH}`
-        cp ${RUST_ALTERNATE_EXE_PATH_NATIVE} ${RUST_ALTERNATE_EXE_PATH}
+        rm -f ${RUST_ALTERNATE_EXE_PATH}
+        cp -f ${RUST_ALTERNATE_EXE_PATH_NATIVE} ${RUST_ALTERNATE_EXE_PATH}
         patchelf --remove-rpath ${RUST_ALTERNATE_EXE_PATH}
     fi
 
Signature · 1 line
2.49.0
#7 lore raw
In reply to [email protected]

Hi all,

I would greatly appreciate feedback on this RFC. Please feel free to share any comments or suggestions you may have.

Regards,
Deepesh

Quoted 21 lines

WIP:
LLVM target tests are currently failing on x86. This is under investigation and will be addressed

Deepesh Varatharajan (4):
clang-tools-extra: disable tests
clang: Enable tests for llvm, clang, lld oeqa/selftest/clang: Add selftest for Clang/LLVM/LLD
rust: Fix rust build failure

  meta/lib/oeqa/selftest/cases/clang.py         | 301 ++++++++++++++++++
  .../0042-guard-clang-tools-extra-test.patch   |  74 +++++
  meta/recipes-devtools/clang/clang_git.bb      |   3 +-
  meta/recipes-devtools/clang/common.inc        |   1 +
  meta/recipes-devtools/clang/lld_git.bb        |   2 +-
  meta/recipes-devtools/clang/llvm_git.bb       |  11 +-
  meta/recipes-devtools/rust/rust_1.92.0.bb     |   5 +-
  7 files changed, 389 insertions(+), 8 deletions(-)

create mode 100644 meta/lib/oeqa/selftest/cases/clang.py
create mode 100644 meta/recipes-devtools/clang/clang/0042-guard-clang-tools-extra-test.patch

#8 lore raw
Quoted 2 lines · Deepesh via lists.openembedded.org

I would greatly appreciate feedback on this RFC. Please feel free to share any comments or suggestions you may have.

Just wanted to note that depending on how busy everyone is, you might not get much feedback, which is fine. After some time, just repost the patch without the RFC tag (if you feel confident about it), and it'll get into yocto CI, and there will be feedback from that at least :)

Alex

#9 lore raw
In reply to [email protected]
Quoted 28 lines · Deepesh via lists.openembedded.org Varatharajan

From: Deepesh Varatharajan <[email protected]>

This patch series introduces a test framework to run selftests for both native and target builds of Clang, LLVM, and LLD.

Summary of changes:

(quoted diff) +0 -4
-Patch 1: Disable clang-tools-extra tests because Clang's CMake cannot 
          see the llvm-bcanalyzer target.
-Patch 2: Enabled the required CMake flags for clang, llvm & lld tests
-Patch 3: Selftest script for Clang, LLVM, and LLD including exclude list
-Patch 4: Fix rust build failure by replacing target llvm-config with native

Testing:
1. The test suite has been successfully validated on x86-64, arm64, riscv64, and arm32 for all three components.
2. Clang, LLVM & LLD all together ~80K tests are there and we currently ~200 tests to exclude list which are failing (0.25%).

WIP:
LLVM target tests are currently failing on x86. This is under investigation and will be addressed

Deepesh Varatharajan (4):
clang-tools-extra: disable tests
clang: Enable tests for llvm, clang, lld oeqa/selftest/clang: Add selftest for Clang/LLVM/LLD
rust: Fix rust build failure

Quoted 10 lines
 meta/lib/oeqa/selftest/cases/clang.py         | 301 ++++++++++++++++++
 .../0042-guard-clang-tools-extra-test.patch   |  74 +++++
 meta/recipes-devtools/clang/clang_git.bb      |   3 +-
 meta/recipes-devtools/clang/common.inc        |   1 +
 meta/recipes-devtools/clang/lld_git.bb        |   2 +-
 meta/recipes-devtools/clang/llvm_git.bb       |  11 +-
 meta/recipes-devtools/rust/rust_1.92.0.bb     |   5 +-
 7 files changed, 389 insertions(+), 8 deletions(-)
 create mode 100644 meta/lib/oeqa/selftest/cases/clang.py
 create mode 100644 meta/recipes-devtools/clang/clang/0042-guard-clang-tools-extra-test.patch

Hi Deepesh,

Thanks for this series. I know it's still RFC, but it went in my week-end batch of RFC patches tested on the autobuilder.

So far, we had the following issues:

2026-02-14 17:23:02,046 - oe-selftest - INFO - clang.ClangFamilyNativeSelfTest.test_clang_family_native (subunit.RemotedTestCase)
2026-02-14 17:23:02,049 - oe-selftest - INFO -  ... FAIL

...
subprocess.CalledProcessError: Command '/srv/pokybuild/yocto-worker/oe-selftest-armhost/build/build-st-1314344/tmp/work/aarch64-linux/clang-native/21.1.8/build/bin/llvm-lit --filter-out 'arm|i386|x86_64|x86|mips|riscv|riscv64|ppc|ppc64|hexagon|sparc|sparcv9|msp430|loongarch|Mac|macho|Darwin|OSX|wasm|Windows|Win|MinGW|COFF|zos|FreeBSD|aix|fuchsia|ve' '/srv/pokybuild/yocto-worker/oe-selftest-armhost/build/build-st-1314344/tmp/work/aarch64-linux/clang-native/21.1.8/build/test' -o '/srv/pokybuild/yocto-worker/oe-selftest-armhost/build/build-st-1314344/tmp/work/aarch64-linux/clang-native/21.1.8/temp/clang-native-results.log'' returned non-zero exit status 127.
...

https://autobuilder.yoctoproject.org/valkyrie/#/builders/23/builds/3316
https://autobuilder.yoctoproject.org/valkyrie/#/builders/35/builds/3214
https://autobuilder.yoctoproject.org/valkyrie/#/builders/48/builds/3090

A second one:

2026-02-14 18:07:00,151 - oe-selftest - INFO - 2: 1/1 8/21 (222.35s) (0 failed) (clang.LLDSelfTestSystemEmulated.test_lld)
2026-02-14 18:07:00,152 - oe-selftest - INFO - testtools.testresult.real._StringException: Traceback (most recent call last):
  File "/srv/pokybuild/yocto-worker/qemux86-tc/build/layers/openembedded-core/meta/lib/oeqa/selftest/cases/clang.py", line 298, in test_lld
    raise AssertionError(f"llvm-lit failed for LLD: {output}")

AssertionError: llvm-lit failed for LLD: sh: line 1: cd: /srv/pokybuild/yocto-worker/qemux86-tc/build/build-st-2874234/tmp/work/core2-32-poky-linux/lld/21.1.8/build/bin: No such file or directory

https://autobuilder.yoctoproject.org/valkyrie/#/builders/28/builds/3136
https://autobuilder.yoctoproject.org/valkyrie/#/builders/42/builds/3113

And a third one:

2026-02-14 21:12:51,873 - oe-selftest - INFO - 3: 1/1 21/21 (18519.15s) (0 failed) (clang.LLVMSelfTestSystemEmulated.test_llvm)
2026-02-14 21:12:51,873 - oe-selftest - INFO - testtools.testresult.real._StringException: Traceback (most recent call last):
  File "/srv/pokybuild/yocto-worker/qemuriscv64-tc/build/layers/openembedded-core/meta/lib/oeqa/selftest/cases/clang.py", line 217, in test_llvm
    raise AssertionError(f"llvm-lit failed for LLVM: {output}")

AssertionError: llvm-lit failed for LLVM: /srv/pokybuild/yocto-worker/qemuriscv64-tc/build/build-st-2197806/tmp/hosttools/ld.gold: line 2: /usr/bin/ld.gold: No such file or directory -- Testing: 22642 of 57881 tests, 4 workers --
...
Process ForkServerPoolWorker-2:
Traceback (most recent call last):
File "/usr/lib/python3.14/multiprocessing/pool.py", line 131, in worker

    put((job, i, result))
    ~~~^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.14/multiprocessing/queues.py", line 397, in put
    self._writer.send_bytes(obj)
    ~~~~~~~~~~~~~~~~~~~~~~~^^^^^

File "/usr/lib/python3.14/multiprocessing/connection.py", line 206, in send_bytes
self._send_bytes(m[offset:offset + size]) ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.14/multiprocessing/connection.py", line 444, in _send_bytes
self._send(header + buf)
~~~~~~~~~~^^^^^^^^^^^^^^
File "/usr/lib/python3.14/multiprocessing/connection.py", line 400, in _send
n = write(self._handle, buf)
BrokenPipeError: [Errno 32] Broken pipe

https://autobuilder.yoctoproject.org/valkyrie/#/builders/58/builds/1041
https://autobuilder.yoctoproject.org/valkyrie/#/builders/66/builds/3210

Thanks,
Mathieu

Signature · 3 lines
Mathieu Dubois-Briand, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com