[compiler-rt] [compiler-rt] Enable sanitizers, XRay, etc for hexagon (PR #190300)
Brian Cain via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 2 18:48:31 PDT 2026
https://github.com/androm3da created https://github.com/llvm/llvm-project/pull/190300
Enable additional compiler-rt components in the hexagon-linux-clangrt standalone cache file.
Also set CAN_TARGET_hexagon=1 to bypass the try_compile() probe that fails during cross-compilation, and configure SANITIZER_CXX_ABI to use the in-tree libc++ to avoid link failures.
>From ac5463922540a26fdb0f72277fc3fda8a2d601dc Mon Sep 17 00:00:00 2001
From: Brian Cain <brian.cain at oss.qualcomm.com>
Date: Thu, 2 Apr 2026 18:45:21 -0700
Subject: [PATCH] [compiler-rt] Enable sanitizers, XRay, etc for hexagon
Enable additional compiler-rt components in the hexagon-linux-clangrt
standalone cache file.
Also set CAN_TARGET_hexagon=1 to bypass the try_compile() probe that
fails during cross-compilation, and configure SANITIZER_CXX_ABI to use
the in-tree libc++ to avoid link failures.
---
.../cmake/caches/hexagon-linux-clangrt.cmake | 19 ++++++++++++-------
1 file changed, 12 insertions(+), 7 deletions(-)
diff --git a/compiler-rt/cmake/caches/hexagon-linux-clangrt.cmake b/compiler-rt/cmake/caches/hexagon-linux-clangrt.cmake
index 4f1d67dcb38e0..e40a706be8858 100644
--- a/compiler-rt/cmake/caches/hexagon-linux-clangrt.cmake
+++ b/compiler-rt/cmake/caches/hexagon-linux-clangrt.cmake
@@ -4,12 +4,17 @@ set(LLVM_DEFAULT_TARGET_TRIPLE hexagon-unknown-linux-musl CACHE STRING "")
set(COMPILER_RT_USE_LLVM_UNWINDER ON CACHE BOOL "")
-# Some build failures here, including the inline asm in
-# `compiler-rt/lib/sanitizer_common/sanitizer_redefine_builtins.h`, so
-# we can just disable these for now:
set(COMPILER_RT_BUILD_BUILTINS OFF CACHE BOOL "")
-set(COMPILER_RT_BUILD_SANITIZERS OFF CACHE BOOL "")
-set(COMPILER_RT_BUILD_XRAY OFF CACHE BOOL "")
-set(COMPILER_RT_BUILD_MEMPROF OFF CACHE BOOL "")
-set(COMPILER_RT_BUILD_CTX_PROFILE OFF CACHE BOOL "")
+set(COMPILER_RT_BUILD_SANITIZERS ON CACHE BOOL "")
+set(COMPILER_RT_BUILD_XRAY ON CACHE BOOL "")
+set(COMPILER_RT_BUILD_PROFILE ON CACHE BOOL "")
+set(COMPILER_RT_BUILD_GWP_ASAN ON CACHE BOOL "")
+set(COMPILER_RT_BUILD_LIBFUZZER ON CACHE BOOL "")
+set(COMPILER_RT_BUILD_MEMPROF ON CACHE BOOL "")
+set(COMPILER_RT_BUILD_CTX_PROFILE ON CACHE BOOL "")
+
+set(CAN_TARGET_hexagon 1 CACHE STRING "")
+set(SANITIZER_CXX_ABI "libc++" CACHE STRING "")
+set(SANITIZER_CXX_ABI_INTREE ON CACHE BOOL "")
+set(COMPILER_RT_USE_BUILTINS_LIBRARY ON CACHE BOOL "")
More information about the llvm-commits
mailing list