[clang] [compiler-rt] [llvm] [SPARC] Properly handle CC for long double on sparc32 (PR #162226)

Sergei Barannikov via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 25 18:58:36 PST 2025


================
@@ -48,7 +48,7 @@ foreach(arch ${BUILTIN_TEST_ARCH})
     string(REPLACE ";" " " BUILTINS_TEST_TARGET_CFLAGS "${BUILTINS_TEST_TARGET_CFLAGS}")
   endif()
 
-  if (COMPILER_RT_ENABLE_SOFTWARE_INT128 OR ${arch} STREQUAL "riscv32")
+  if (COMPILER_RT_ENABLE_SOFTWARE_INT128 OR "${arch}" MATCHES "riscv32|sparc$" AND NOT CMAKE_COMPILER_IS_GNUCC)
----------------
s-barannikov wrote:

CMake evaluates AND/OR from left to right with equivalent precedence, so this should probably be
```suggestion
  if (COMPILER_RT_ENABLE_SOFTWARE_INT128 OR ("${arch}" MATCHES "riscv32|sparc$" AND NOT CMAKE_COMPILER_IS_GNUCC))
```
Also, the line appears to be much longer than the 80 column limit?


https://github.com/llvm/llvm-project/pull/162226


More information about the llvm-commits mailing list