diff mbox series

[1/2] libcxx: Create packageconfig for cross unwinder support

Message ID 20250807004425.1768854-1-raj.khem@gmail.com
State New
Headers show
Series [1/2] libcxx: Create packageconfig for cross unwinder support | expand

Commit Message

Khem Raj Aug. 7, 2025, 12:44 a.m. UTC
cross-unwinding can pass exception across runtimes e.g.
Multi-language applications ( nodejs native modules, python C extensions )

However, cross-unwinding is not default in libcxx for sometime [1]
it requires special handling at runtime by apps who use it
Switch recipe defaults to upstream defaults, which is to turn it off

This means native unwinding ( with in same runtime )
is build by default which is the most common case.

This also fixes libcxx/libunwind build errors
when enabling TC_CXX_RUNTIME = "llvm" on aarch64 particularly

[1] https://github.com/llvm/llvm-project/commit/85624c5de3e831ffa01fdc2d159e3d69c30de08d

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 meta/recipes-devtools/clang/libcxx_git.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/meta/recipes-devtools/clang/libcxx_git.bb b/meta/recipes-devtools/clang/libcxx_git.bb
index d6bacc33d6b..b0ee3925f43 100644
--- a/meta/recipes-devtools/clang/libcxx_git.bb
+++ b/meta/recipes-devtools/clang/libcxx_git.bb
@@ -20,6 +20,7 @@  PACKAGECONFIG[exceptions] = "-DLIBCXXABI_ENABLE_EXCEPTIONS=ON -DLIBCXX_ENABLE_EX
 PACKAGECONFIG[no-atomics] = "-D_LIBCXXABI_HAS_ATOMIC_BUILTINS=OFF -DCMAKE_SHARED_LINKER_FLAGS='-latomic',,"
 PACKAGECONFIG[compiler-rt] = "-DLIBCXX_USE_COMPILER_RT=ON -DLIBCXXABI_USE_COMPILER_RT=ON -DLIBUNWIND_USE_COMPILER_RT=ON,,compiler-rt"
 PACKAGECONFIG[unwind-shared] = "-DLIBUNWIND_ENABLE_SHARED=ON,-DLIBUNWIND_ENABLE_SHARED=OFF,,"
+PACKAGECONFIG[unwind-cross] = "-DLIBUNWIND_ENABLE_CROSS_UNWINDING=ON,-DLIBUNWIND_ENABLE_CROSS_UNWINDING=OFF,,"
 
 DEPENDS:append:class-target = " virtual/cross-c++ ${MLPREFIX}clang-cross-${TARGET_ARCH} virtual/${MLPREFIX}libc virtual/${MLPREFIX}compilerlibs"
 DEPENDS:append:class-nativesdk = " virtual/cross-c++ clang-crosssdk-${SDK_SYS} nativesdk-compiler-rt"
@@ -64,7 +65,6 @@  EXTRA_OECMAKE += "\
                   -DCMAKE_CROSSCOMPILING=ON \
                   -DLLVM_TEMPORARILY_ALLOW_OLD_TOOLCHAIN=ON \
                   -DLLVM_ENABLE_RTTI=ON \
-                  -DLIBUNWIND_ENABLE_CROSS_UNWINDING=ON \
                   -DLIBCXX_ENABLE_STATIC_ABI_LIBRARY=ON \
                   -DLIBCXXABI_INCLUDE_TESTS=OFF \
                   -DLIBCXXABI_ENABLE_SHARED=ON \