aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2026-07-26 15:30:41 +0900
committerOphestra <cat@gensokyo.uk>2026-07-27 18:15:00 +0900
commitbd0cc3656f117093548d964b2868aa6f7e7d5d42 (patch)
treef3956e4f1946767e1ecd549f7de46b67a22fe396
parent0219240adb63e5a490ea6de8808db0dff746356a (diff)
internal/rosa/llvm: statically link libc++
This avoids unnecessarily depending on the toolchain. Signed-off-by: Ophestra <cat@gensokyo.uk>
-rw-r--r--internal/rosa/llvm.go9
1 files changed, 8 insertions, 1 deletions
diff --git a/internal/rosa/llvm.go b/internal/rosa/llvm.go
index 9568b5aa..19815a2f 100644
--- a/internal/rosa/llvm.go
+++ b/internal/rosa/llvm.go
@@ -83,9 +83,11 @@ func init() {
{"LIBCXX_ENABLE_STATIC_ABI_LIBRARY", "OFF"},
{"LIBCXX_HAS_MUSL_LIBC", "ON"},
{"LIBCXX_HARDENING_MODE", "fast"},
+ {"LIBCXX_STATICALLY_LINK_ABI_IN_STATIC_LIBRARY", "ON"},
{"LIBCXXABI_USE_LLVM_UNWINDER", "ON"},
- {"LIBCXXABI_ENABLE_STATIC_UNWINDER", "OFF"},
+ {"LIBCXXABI_ENABLE_STATIC_UNWINDER", "ON"},
{"LIBCXXABI_USE_COMPILER_RT", "ON"},
+ {"LIBCXXABI_STATICALLY_LINK_UNWINDER_IN_STATIC_LIBRARY", "ON"},
{"LLVM_INSTALL_BINUTILS_SYMLINKS", "ON"},
{"LLVM_INSTALL_UTILS", "ON"},
{"LLVM_BUILD_LLVM_DYLIB", "ON"},
@@ -138,6 +140,10 @@ func init() {
"CodeGen/PowerPC/ppc-tmmintrin.c",
"CodeGen/PowerPC/ppc-smmintrin.c",
"CodeGenCUDA/amdgpu-alias-undef-symbols.cu",
+ // clang: deadlocks with LIBCXXABI_ENABLE_STATIC_UNWINDER
+ "global-value-regex",
+ "global-hex-value-regex",
+ "check-globals",
// cxx: fails on musl
"close.dont-get-rid-of-buffer",
"re/re.traits",
@@ -196,6 +202,7 @@ ln -s ld.lld /work/system/bin/ld
ln -s clang /work/system/bin/cc
ln -s clang /work/system/bin/cpp
ln -s clang++ /work/system/bin/c++
+echo '-static-libstdc++' > /work/system/bin/clang++.cfg
`,
// LLVM_LINK_LLVM_DYLIB causes llvm test suite to leak system