[compiler-rt] 5aee01a - [compiler-rt] Rework 08debd7f4461 [-Wno-c2y-extensions]

NAKAMURA Takumi via llvm-commits llvm-commits at lists.llvm.org
Sat Dec 27 04:39:49 PST 2025


Author: NAKAMURA Takumi
Date: 2025-12-27T21:39:15+09:00
New Revision: 5aee01a3df011e660f26660bc30a8c94a1651d8e

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

LOG: [compiler-rt] Rework 08debd7f4461 [-Wno-c2y-extensions]

Added: 
    

Modified: 
    compiler-rt/lib/builtins/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/compiler-rt/lib/builtins/CMakeLists.txt b/compiler-rt/lib/builtins/CMakeLists.txt
index 107e48b84b2b7..631e1b712ec8c 100644
--- a/compiler-rt/lib/builtins/CMakeLists.txt
+++ b/compiler-rt/lib/builtins/CMakeLists.txt
@@ -906,6 +906,9 @@ else ()
   append_list_if(COMPILER_RT_HAS_NOSTDINCXX_FLAG -nostdinc++ BUILTIN_CFLAGS)
   append_list_if(COMPILER_RT_HAS_WBUILTIN_DECLARATION_MISMATCH_FLAG -Werror=builtin-declaration-mismatch BUILTIN_CFLAGS)
 
+  # Builtins use __COUNTER__
+  append_list_if(COMPILER_RT_HAS_WNO_C2Y_EXTENSIONS -Wno-c2y-extensions BUILTIN_CFLAGS)
+
   # Don't embed directives for picking any specific CRT
   if (MSVC)
     set(CMAKE_MSVC_RUNTIME_LIBRARY "")
@@ -1094,7 +1097,6 @@ if (COMPILER_RT_BUILD_CRT)
   append_list_if(COMPILER_RT_HAS_INITFINI_ARRAY -DCRT_HAS_INITFINI_ARRAY CRT_CFLAGS)
   append_list_if(COMPILER_RT_CRT_USE_EH_FRAME_REGISTRY -DEH_USE_FRAME_REGISTRY CRT_CFLAGS)
   append_list_if(COMPILER_RT_HAS_FPIC_FLAG -fPIC CRT_CFLAGS)
-  append_list_if(COMPILER_RT_HAS_WNO_C2Y_EXTENSIONS -Wno-c2y-extensions CRT_CFLAGS)
   append_list_if(COMPILER_RT_HAS_WNO_PEDANTIC -Wno-pedantic CRT_CFLAGS)
   if (COMPILER_RT_HAS_FCF_PROTECTION_FLAG)
     append_list_if(COMPILER_RT_ENABLE_CET -fcf-protection=full CRT_CFLAGS)


        


More information about the llvm-commits mailing list