[compiler-rt] [compiler-rt][builtins] Fix GCC build warnings for unsupported flags (PR #194444)

Farid Zakaria via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 27 14:46:23 PDT 2026


================
@@ -18,7 +18,8 @@ builtin_check_c_compiler_flag(-fno-lto              COMPILER_RT_HAS_FNO_LTO_FLAG
 builtin_check_c_compiler_flag(-fno-profile-generate COMPILER_RT_HAS_FNO_PROFILE_GENERATE_FLAG)
 builtin_check_c_compiler_flag(-fno-profile-instr-generate COMPILER_RT_HAS_FNO_PROFILE_INSTR_GENERATE_FLAG)
 builtin_check_c_compiler_flag(-fno-profile-instr-use COMPILER_RT_HAS_FNO_PROFILE_INSTR_USE_FLAG)
-builtin_check_c_compiler_flag(-Wno-c2y-extensions   COMPILER_RT_HAS_WNO_C2Y_EXTENSIONS)
+# gcc returns 0 for -Wno-* if unknown but 1 for the -W* version
+builtin_check_c_compiler_flag(-Wc2y-extensions      COMPILER_RT_HAS_WNO_C2Y_EXTENSIONS)
----------------
fzakaria wrote:

Done.

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


More information about the llvm-commits mailing list