[compiler-rt] r253646 - Silence "unrecognised -std=c99" warning on MSVC.
George Burgess IV via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 19 19:37:13 PST 2015
Author: gbiv
Date: Thu Nov 19 21:37:12 2015
New Revision: 253646
URL: http://llvm.org/viewvc/llvm-project?rev=253646&view=rev
Log:
Silence "unrecognised -std=c99" warning on MSVC.
Thanks to angelsl for the patch!
Differential Revision: http://reviews.llvm.org/D13692
Modified:
compiler-rt/trunk/cmake/config-ix.cmake
compiler-rt/trunk/lib/builtins/CMakeLists.txt
Modified: compiler-rt/trunk/cmake/config-ix.cmake
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/cmake/config-ix.cmake?rev=253646&r1=253645&r2=253646&view=diff
==============================================================================
--- compiler-rt/trunk/cmake/config-ix.cmake (original)
+++ compiler-rt/trunk/cmake/config-ix.cmake Thu Nov 19 21:37:12 2015
@@ -28,6 +28,7 @@ check_cxx_compiler_flag(-std=c++11
check_cxx_compiler_flag(-ftls-model=initial-exec COMPILER_RT_HAS_FTLS_MODEL_INITIAL_EXEC)
check_cxx_compiler_flag(-fno-lto COMPILER_RT_HAS_FNO_LTO_FLAG)
check_cxx_compiler_flag(-msse3 COMPILER_RT_HAS_MSSE3_FLAG)
+check_c_compiler_flag(-std=c99 COMPILER_RT_HAS_STD_C99_FLAG)
check_cxx_compiler_flag(/GR COMPILER_RT_HAS_GR_FLAG)
check_cxx_compiler_flag(/GS COMPILER_RT_HAS_GS_FLAG)
Modified: compiler-rt/trunk/lib/builtins/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/builtins/CMakeLists.txt?rev=253646&r1=253645&r2=253646&view=diff
==============================================================================
--- compiler-rt/trunk/lib/builtins/CMakeLists.txt (original)
+++ compiler-rt/trunk/lib/builtins/CMakeLists.txt Thu Nov 19 21:37:12 2015
@@ -359,6 +359,8 @@ if (APPLE)
add_subdirectory(macho_embedded)
darwin_add_builtin_libraries(${BUILTIN_SUPPORTED_OS})
elseif (NOT WIN32 OR MINGW)
+ append_string_if(COMPILER_RT_HAS_STD_C99_FLAG -std=c99 maybe_stdc99)
+
foreach (arch ${BUILTIN_SUPPORTED_ARCH})
if (CAN_TARGET_${arch})
# Filter out generic versions of routines that are re-implemented in
@@ -376,7 +378,7 @@ elseif (NOT WIN32 OR MINGW)
STATIC
ARCHS ${arch}
SOURCES ${${arch}_SOURCES}
- CFLAGS "-std=c99"
+ CFLAGS ${maybe_stdc99}
PARENT_TARGET builtins)
endif ()
endforeach ()
More information about the llvm-commits
mailing list