[PATCH] D13926: Set -std=c99 flag on Darwin for builtins too

angelsl via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 20 20:00:46 PDT 2015


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

Although this isn't really needed, but I guess for consistency's sake.

http://reviews.llvm.org/D13926

Files:
  cmake/Modules/CompilerRTDarwinUtils.cmake

Index: cmake/Modules/CompilerRTDarwinUtils.cmake
===================================================================
--- cmake/Modules/CompilerRTDarwinUtils.cmake
+++ cmake/Modules/CompilerRTDarwinUtils.cmake
@@ -263,6 +263,7 @@
   set(CMAKE_C_FLAGS "-fPIC -fvisibility=hidden -DVISIBILITY_HIDDEN -Wall -fomit-frame-pointer")
   set(CMAKE_CXX_FLAGS ${CMAKE_C_FLAGS})
   set(CMAKE_ASM_FLAGS ${CMAKE_C_FLAGS})
+  append_string_if(COMPILER_RT_HAS_STD_C99_FLAG -std=c99 maybe_stdc99)
 
   set(PROFILE_SOURCES ../profile/InstrProfiling 
                       ../profile/InstrProfilingBuffer
@@ -283,7 +284,7 @@
                               OS ${os}
                               ARCH ${arch}
                               SOURCES ${filtered_sources}
-                              CFLAGS -arch ${arch}
+                              CFLAGS -arch ${arch} ${maybe_stdc99}
                               PARENT_TARGET builtins)
     endforeach()
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D13926.37962.patch
Type: text/x-patch
Size: 945 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151021/538b6a80/attachment.bin>


More information about the llvm-commits mailing list