[PATCH] D13692: Silence warning for unrecognised "-std=c99" warning on MSVC
angelsl via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 20 19:49:13 PDT 2015
angelsl updated this revision to Diff 37960.
angelsl added a comment.
Append the flag outside the loop (otherwise we get it twice, thrice, etc)
http://reviews.llvm.org/D13692
Files:
cmake/config-ix.cmake
lib/builtins/CMakeLists.txt
Index: lib/builtins/CMakeLists.txt
===================================================================
--- lib/builtins/CMakeLists.txt
+++ lib/builtins/CMakeLists.txt
@@ -348,6 +348,8 @@
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
@@ -365,7 +367,7 @@
STATIC
ARCHS ${arch}
SOURCES ${${arch}_SOURCES}
- CFLAGS "-std=c99"
+ CFLAGS ${maybe_stdc99}
PARENT_TARGET builtins)
endif ()
endforeach ()
Index: cmake/config-ix.cmake
===================================================================
--- cmake/config-ix.cmake
+++ cmake/config-ix.cmake
@@ -29,6 +29,9 @@
check_cxx_compiler_flag(-fno-lto COMPILER_RT_HAS_FNO_LTO_FLAG)
check_cxx_compiler_flag(-msse3 COMPILER_RT_HAS_MSSE3_FLAG)
+# Language options
+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)
check_cxx_compiler_flag(/MT COMPILER_RT_HAS_MT_FLAG)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D13692.37960.patch
Type: text/x-patch
Size: 1447 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151021/846c54cd/attachment.bin>
More information about the llvm-commits
mailing list