[PATCH] D13692: Silence warning for unrecognised "-std=c99" warning on MSVC

angelsl via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 13 04:23:03 PDT 2015


angelsl created this revision.
angelsl added a reviewer: compnerd.
angelsl added subscribers: compnerd, llvm-commits.

http://reviews.llvm.org/D13692

Files:
  lib/builtins/CMakeLists.txt

Index: lib/builtins/CMakeLists.txt
===================================================================
--- lib/builtins/CMakeLists.txt
+++ lib/builtins/CMakeLists.txt
@@ -361,11 +361,18 @@
         endif ()
       endforeach ()
 
+      # MSVC doesn't take this argument, silence the warning
+      if (MSVC)
+        set(_cflags "")
+      else ()
+        set(_cflags "-std=c99")
+      endif ()
+
       add_compiler_rt_runtime(clang_rt.builtins
                               STATIC
                               ARCHS ${arch}
                               SOURCES ${${arch}_SOURCES}
-                              CFLAGS "-std=c99"
+                              CFLAGS ${_cflags}
                               PARENT_TARGET builtins)
     endif ()
   endforeach ()


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D13692.37232.patch
Type: text/x-patch
Size: 774 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151013/a4be7865/attachment.bin>


More information about the llvm-commits mailing list