[compiler-rt] r200753 - CMake: Enable -Werror for the -fno-function-sections check

Justin Bogner mail at justinbogner.com
Tue Feb 4 02:40:46 PST 2014


Author: bogner
Date: Tue Feb  4 04:40:46 2014
New Revision: 200753

URL: http://llvm.org/viewvc/llvm-project?rev=200753&view=rev
Log:
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.

Modified:
    compiler-rt/trunk/CMakeLists.txt

Modified: compiler-rt/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/CMakeLists.txt?rev=200753&r1=200752&r2=200753&view=diff
==============================================================================
--- compiler-rt/trunk/CMakeLists.txt (original)
+++ compiler-rt/trunk/CMakeLists.txt Tue Feb  4 04:40:46 2014
@@ -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()





More information about the llvm-commits mailing list