[compiler-rt] 80a9574 - [compiler-rt] Unbreak GCC builds after bfa6444a332f82843
Alex Richardson via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 8 00:45:55 PST 2024
Author: Alex Richardson
Date: 2024-03-08T00:45:33-08:00
New Revision: 80a9574d36834f7e0814e603894347e997435d54
URL: https://github.com/llvm/llvm-project/commit/80a9574d36834f7e0814e603894347e997435d54
DIFF: https://github.com/llvm/llvm-project/commit/80a9574d36834f7e0814e603894347e997435d54.diff
LOG: [compiler-rt] Unbreak GCC builds after bfa6444a332f82843
GCC complains if we pass -Werror=format-security without -Wformat.
Reported at https://github.com/llvm/llvm-project/pull/83779#issuecomment-1985246797
Added:
Modified:
compiler-rt/cmake/Modules/CompilerRTUtils.cmake
Removed:
################################################################################
diff --git a/compiler-rt/cmake/Modules/CompilerRTUtils.cmake b/compiler-rt/cmake/Modules/CompilerRTUtils.cmake
index 25e7823716fc2f..e8e5f612d5b03c 100644
--- a/compiler-rt/cmake/Modules/CompilerRTUtils.cmake
+++ b/compiler-rt/cmake/Modules/CompilerRTUtils.cmake
@@ -583,7 +583,8 @@ function(add_security_warnings out_flags macosx_sdk_version)
append_list_if(COMPILER_RT_HAS_RETURN_STACK_ADDRESS_FLAG -Werror=return-stack-address flags)
append_list_if(COMPILER_RT_HAS_SIZEOF_ARRAY_DECAY_FLAG -Werror=sizeof-array-decay flags)
append_list_if(COMPILER_RT_HAS_FORMAT_INSUFFICIENT_ARGS_FLAG -Werror=format-insufficient-args flags)
- append_list_if(COMPILER_RT_HAS_BUILTIN_FORMAL_SECURITY_FLAG -Werror=format-security flags)
+ # GCC complains if we pass -Werror=format-security without -Wformat
+ append_list_if(COMPILER_RT_HAS_BUILTIN_FORMAL_SECURITY_FLAG -Wformat -Werror=format-security flags)
append_list_if(COMPILER_RT_HAS_SIZEOF_ARRAY_DIV_FLAG -Werror=sizeof-array-div)
append_list_if(COMPILER_RT_HAS_SIZEOF_POINTER_DIV_FLAG -Werror=sizeof-pointer-div)
More information about the llvm-commits
mailing list