[clang] [clang][cmake] Disable exceptions for ASan runtime on Fuchsia (PR #204512)
via cfe-commits
cfe-commits at lists.llvm.org
Thu Jun 18 00:08:43 PDT 2026
llvmorg-github-actions[bot] wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-clang
Author: Haowei (zeroomega)
<details>
<summary>Changes</summary>
Fuchsia's default runtime environment prefers no-exceptions. Compiling the C++ slice of ASan (asan_new_delete.cpp) with exceptions introduces dependencies on EH symbols
(__cxa_begin_catch, etc.) in libclang_rt.asan.so. This causes link failures when linking ASan-enabled binaries with noexcept libc++abi. Explicitly disable COMPILER_RT_ASAN_ENABLE_EXCEPTIONS for Fuchsia targets in the stage2 cache.
---
Full diff: https://github.com/llvm/llvm-project/pull/204512.diff
1 Files Affected:
- (modified) clang/cmake/caches/Fuchsia-stage2.cmake (+1)
``````````diff
diff --git a/clang/cmake/caches/Fuchsia-stage2.cmake b/clang/cmake/caches/Fuchsia-stage2.cmake
index 31067bcc31c22..e4d7a1c9f63ab 100644
--- a/clang/cmake/caches/Fuchsia-stage2.cmake
+++ b/clang/cmake/caches/Fuchsia-stage2.cmake
@@ -240,6 +240,7 @@ if(FUCHSIA_SDK)
set(RUNTIMES_${target}_COMPILER_RT_CXX_LIBRARY "libcxx" CACHE STRING "")
set(RUNTIMES_${target}_COMPILER_RT_USE_BUILTINS_LIBRARY ON CACHE BOOL "")
set(RUNTIMES_${target}_COMPILER_RT_USE_LLVM_UNWINDER ON CACHE BOOL "")
+ set(RUNTIMES_${target}_COMPILER_RT_ASAN_ENABLE_EXCEPTIONS OFF CACHE BOOL "")
set(RUNTIMES_${target}_LIBUNWIND_USE_COMPILER_RT ON CACHE BOOL "")
set(RUNTIMES_${target}_LIBUNWIND_HIDE_SYMBOLS ON CACHE BOOL "")
set(RUNTIMES_${target}_LIBCXXABI_USE_COMPILER_RT ON CACHE BOOL "")
``````````
</details>
https://github.com/llvm/llvm-project/pull/204512
More information about the cfe-commits
mailing list