forked from OSchip/llvm-project
CMake: Enable -Werror for the -fno-function-sections check
If the -fno-function-sections flag isn't recognized, the compiler emits a warning. This isn't enough to cause the check to fail, so we enable -Werror as well. llvm-svn: 200753
This commit is contained in:
parent
e42fb07618
commit
ad560c4c11
|
@ -164,7 +164,7 @@ if (NOT MSVC)
|
|||
endif()
|
||||
endif()
|
||||
# Build sanitizer runtimes with -fno-function-sections.
|
||||
check_cxx_compiler_flag(-fno-function-sections SUPPORTS_FNO_FUNCTION_SECTIONS_FLAG)
|
||||
check_cxx_compiler_flag(-Werror -fno-function-sections SUPPORTS_FNO_FUNCTION_SECTIONS_FLAG)
|
||||
if(SUPPORTS_FNO_FUNCTION_SECTIONS_FLAG)
|
||||
list(APPEND SANITIZER_COMMON_CFLAGS -fno-function-sections)
|
||||
endif()
|
||||
|
|
Loading…
Reference in New Issue