[libc-commits] [libc] cd1baf3 - [libc][NFC][wctype] Fix test ci for old drivers (#199307)

via libc-commits libc-commits at lists.llvm.org
Fri May 22 18:10:50 PDT 2026


Author: Muhammad Bassiouni
Date: 2026-05-23T04:10:46+03:00
New Revision: cd1baf3cdc013d5ec68684a68d6a4376ed4027e0

URL: https://github.com/llvm/llvm-project/commit/cd1baf3cdc013d5ec68684a68d6a4376ed4027e0
DIFF: https://github.com/llvm/llvm-project/commit/cd1baf3cdc013d5ec68684a68d6a4376ed4027e0.diff

LOG: [libc][NFC][wctype] Fix test ci for old drivers (#199307)

Added: 
    

Modified: 
    libc/test/src/__support/wctype/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/libc/test/src/__support/wctype/CMakeLists.txt b/libc/test/src/__support/wctype/CMakeLists.txt
index 17c98dc3d2770..988e71e45ae32 100644
--- a/libc/test/src/__support/wctype/CMakeLists.txt
+++ b/libc/test/src/__support/wctype/CMakeLists.txt
@@ -1,5 +1,21 @@
 add_custom_target(libc-support-wctype-tests)
 
+set(CONSTEXPR_FLAGS "")
+
+if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
+  if(CMAKE_CXX_SIMULATE_ID STREQUAL "MSVC")
+    list(APPEND CONSTEXPR_FLAGS
+      -Xclang
+      -fconstexpr-steps=10000000)
+  else()
+    list(APPEND CONSTEXPR_FLAGS
+      -fconstexpr-steps=10000000)
+  endif()
+elseif(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
+  list(APPEND CONSTEXPR_FLAGS
+    -fconstexpr-ops-limit=10000000)
+endif()
+
 add_libc_test(
   wctype_perfect_hash_test
   SUITE
@@ -7,8 +23,7 @@ add_libc_test(
   SRCS
     wctype_perfect_hash_test.cpp
   COMPILE_OPTIONS
-    $<$<CXX_COMPILER_ID:Clang>:-Xclang -fconstexpr-steps=10000000>
-    $<$<CXX_COMPILER_ID:GNU>:-fconstexpr-ops-limit=10000000>
+    ${CONSTEXPR_FLAGS}
   DEPENDS
     libc.src.__support.wctype.lower_to_upper
     libc.src.__support.wctype.upper_to_lower


        


More information about the libc-commits mailing list