diff mbox series

packagegroups: Add clang to the SDK

Message ID 20261108073103.1232032-1-khem.raj@oss.qualcomm.com
State New
Headers show
Series packagegroups: Add clang to the SDK | expand

Commit Message

Khem Raj Nov. 8, 2026, 7:31 a.m. UTC
Now that clang is part of oe-core, ship it in the SDK the way meta-clang
did through its packagegroup bbappends:

- packagegroup-cross-canadian pulls in clang-cross-canadian for each
  multilib, next to gcc-cross-canadian.
- packagegroup-core-standalone-sdk-target adds the libcxx and
  compiler-rt dev/staticdev packages when TC_CXX_RUNTIME is llvm or
  android, so the SDK can link against the LLVM C++ runtime.

Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
---
 .../packagegroups/packagegroup-core-standalone-sdk-target.bb | 5 +++++
 .../packagegroups/packagegroup-cross-canadian.bb             | 2 ++
 2 files changed, 7 insertions(+)

Comments

Dora, Sunil Kumar Nov. 8, 2026, 11:17 a.m. UTC | #1
Hi Khem,

Is it intended that this is unconditional? meta-clang gated the SDK
bits on CLANGSDK (default "0") and had the target libs as RRECOMMENDS
under toolchain-clang. With this every populate_sdk builds
nativesdk-clang (0 -> 98 entries in task-depends.dot on master,
nodistro/qemux86-64).

If the opt-in is meant to go, maybe gate on SDK_FEATURES like go/rust?

~Sunil Dora
diff mbox series

Patch

diff --git a/meta/recipes-core/packagegroups/packagegroup-core-standalone-sdk-target.bb b/meta/recipes-core/packagegroups/packagegroup-core-standalone-sdk-target.bb
index 06fdda90c7..dbe9cc0449 100644
--- a/meta/recipes-core/packagegroups/packagegroup-core-standalone-sdk-target.bb
+++ b/meta/recipes-core/packagegroups/packagegroup-core-standalone-sdk-target.bb
@@ -12,6 +12,11 @@  RDEPENDS:${PN} = "\
     libstdc++ \
     libstdc++-dev \
     ${LIBC_DEPENDENCIES} \
+    ${@bb.utils.contains_any('TC_CXX_RUNTIME', 'llvm android', 'libcxx-dev \
+    libcxx-staticdev \
+    compiler-rt-dev \
+    compiler-rt-staticdev \
+    ', '', d)} \
     "
 
 RRECOMMENDS:${PN}:mingw32 = "\
diff --git a/meta/recipes-core/packagegroups/packagegroup-cross-canadian.bb b/meta/recipes-core/packagegroups/packagegroup-cross-canadian.bb
index b87721a4bc..b9479b6bb5 100644
--- a/meta/recipes-core/packagegroups/packagegroup-cross-canadian.bb
+++ b/meta/recipes-core/packagegroups/packagegroup-cross-canadian.bb
@@ -9,11 +9,13 @@  PACKAGEGROUP_DISABLE_COMPLEMENTARY = "1"
 BINUTILS = "binutils-cross-canadian-${TRANSLATED_TARGET_ARCH}"
 GCC = "gcc-cross-canadian-${TRANSLATED_TARGET_ARCH}"
 GDB = "gdb-cross-canadian-${TRANSLATED_TARGET_ARCH}"
+CLANG = "clang-cross-canadian-${TRANSLATED_TARGET_ARCH}"
 
 RDEPENDS:${PN} = "\
     ${@oe.utils.all_multilib_tune_values(d, 'BINUTILS')} \
     ${@oe.utils.all_multilib_tune_values(d, 'GCC')} \
     ${@oe.utils.all_multilib_tune_values(d, 'GDB')} \
+    ${@oe.utils.all_multilib_tune_values(d, 'CLANG')}\
     meta-environment-${MACHINE} \
     "