public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
From: Deepesh Varatharajan <deepesh.varatharajan@windriver.com>
To: Peter Kjellerstedt <peter.kjellerstedt@axis.com>,
	"openembedded-core@lists.openembedded.org"
	<openembedded-core@lists.openembedded.org>
Cc: "Randy.MacLeod@windriver.com" <Randy.MacLeod@windriver.com>,
	"Sundeep.Kokkonda@windriver.com" <Sundeep.Kokkonda@windriver.com>
Subject: Re: [OE-core] [RFC 2/4] clang: Enable tests for llvm, clang, lld
Date: Wed, 4 Feb 2026 11:04:18 +0530	[thread overview]
Message-ID: <427a9d34-94c5-49c4-b2cf-55e567157f17@windriver.com> (raw)
In-Reply-To: <DB5PR02MB10213EFF0F909111910AB7E1AEF9BA@DB5PR02MB10213.eurprd02.prod.outlook.com>


On 03-02-2026 21:38, Peter Kjellerstedt wrote:
> 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.
>
>> -----Original Message-----
>> From: openembedded-core@lists.openembedded.org <openembedded-core@lists.openembedded.org> On Behalf Of Varatharajan, Deepesh via lists.openembedded.org
>> Sent: den 3 februari 2026 15:03
>> To: openembedded-core@lists.openembedded.org
>> Cc: Randy.MacLeod@windriver.com; Sundeep.Kokkonda@windriver.com; Deepesh.Varatharajan@windriver.com
>> Subject: [OE-core] [RFC 2/4] clang: Enable tests for llvm, clang, lld
>>
>> From: Deepesh Varatharajan <Deepesh.Varatharajan@windriver.com>
>>
>> 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.
>>
>> Signed-off-by: Deepesh Varatharajan <Deepesh.Varatharajan@windriver.com>
>> ---
>>   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(-)
>>
>> diff --git a/meta/recipes-devtools/clang/clang_git.bb b/meta/recipes-devtools/clang/clang_git.bb
>> index e10c327a2a..a1ff25f863 100644
>> --- a/meta/recipes-devtools/clang/clang_git.bb
>> +++ b/meta/recipes-devtools/clang/clang_git.bb
>> @@ -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 \
>> diff --git a/meta/recipes-devtools/clang/lld_git.bb b/meta/recipes-devtools/clang/lld_git.bb
>> index ba36942790..1d3d80e117 100644
>> --- a/meta/recipes-devtools/clang/lld_git.bb
>> +++ b/meta/recipes-devtools/clang/lld_git.bb
>> @@ -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"
>> diff --git a/meta/recipes-devtools/clang/llvm_git.bb b/meta/recipes-devtools/clang/llvm_git.bb
>> index 96ea383731..6fed382d69 100644
>> --- a/meta/recipes-devtools/clang/llvm_git.bb
>> +++ b/meta/recipes-devtools/clang/llvm_git.bb
>> @@ -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"
>> --
>> 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
>


  reply	other threads:[~2026-02-04  5:34 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-03 14:03 [RFC 0/4] Oe-selftest for Clang, LLVM, LLD Deepesh.Varatharajan
2026-02-03 14:03 ` [RFC 1/4] clang-tools-extra: disable tests Deepesh.Varatharajan
2026-02-03 14:03 ` [RFC 2/4] clang: Enable tests for llvm, clang, lld Deepesh.Varatharajan
2026-02-03 16:08   ` [OE-core] " Peter Kjellerstedt
2026-02-04  5:34     ` Deepesh Varatharajan [this message]
2026-02-03 14:03 ` [RFC 3/4] oeqa/selftest/clang: Add selftest for Clang/LLVM/LLD Deepesh.Varatharajan
2026-02-03 14:03 ` [RFC 4/4] rust: Fix rust build failure Deepesh.Varatharajan
2026-02-12 16:34 ` [RFC 0/4] Oe-selftest for Clang, LLVM, LLD Deepesh Varatharajan
2026-02-12 18:01   ` [OE-core] " Alexander Kanavin
2026-02-15  8:54 ` Mathieu Dubois-Briand

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=427a9d34-94c5-49c4-b2cf-55e567157f17@windriver.com \
    --to=deepesh.varatharajan@windriver.com \
    --cc=Randy.MacLeod@windriver.com \
    --cc=Sundeep.Kokkonda@windriver.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=peter.kjellerstedt@axis.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox