[compiler-rt] [ubsan_minimal] Build on Solaris (PR #184976)

Rainer Orth via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 6 02:06:47 PST 2026


https://github.com/rorth created https://github.com/llvm/llvm-project/pull/184976

Two tests currently `FAIL` on Solaris/amd64 and Solaris/sparcv9:

```
  SafeStack-Standalone-i386 :: overflow.c
  SafeStack-Standalone-x86_64 :: overflow.c
```

This happens because `libclang_rt.ubsan_minimal.a` isn't built on Solaris although it's required with `-fsanitize-minimal-runtime`.

This patch fixes this.

Tested on `amd64-pc-solaris2.11` and `sparcv9-sun-solaris2.11`.

>From 95126c13213b9eba224dfd1fabb150e2f7625abb Mon Sep 17 00:00:00 2001
From: Rainer Orth <ro at gcc.gnu.org>
Date: Fri, 6 Mar 2026 11:02:58 +0100
Subject: [PATCH] [ubsan_minimal] Build on Solaris

Two tests currently `FAIL` on Solaris/amd64 and Solaris/sparcv9:

```
  SafeStack-Standalone-i386 :: overflow.c
  SafeStack-Standalone-x86_64 :: overflow.c
```

This happens because `libclang_rt.ubsan_minimal.a` isn't built on Solaris
although it's required with `-fsanitize-minimal-runtime`.

This patch fixes this.

Tested on `amd64-pc-solaris2.11` and `sparcv9-sun-solaris2.11`.
---
 compiler-rt/cmake/config-ix.cmake | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/compiler-rt/cmake/config-ix.cmake b/compiler-rt/cmake/config-ix.cmake
index 1f82ff3cf7531..95cac0f8faa9f 100644
--- a/compiler-rt/cmake/config-ix.cmake
+++ b/compiler-rt/cmake/config-ix.cmake
@@ -889,7 +889,7 @@ else()
 endif()
 
 if (COMPILER_RT_HAS_SANITIZER_COMMON AND UBSAN_SUPPORTED_ARCH AND
-    OS_NAME MATCHES "Linux|FreeBSD|NetBSD|Android|Darwin")
+    OS_NAME MATCHES "Linux|FreeBSD|NetBSD|Android|Darwin|SunOS")
   set(COMPILER_RT_HAS_UBSAN_MINIMAL TRUE)
 else()
   set(COMPILER_RT_HAS_UBSAN_MINIMAL FALSE)



More information about the llvm-commits mailing list