[CMake] [Darwin] libclang_rt.eprintf should be built with the same CFLAGS as the other darwin builtin libraries.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@254082 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/cmake/Modules/CompilerRTDarwinUtils.cmake b/cmake/Modules/CompilerRTDarwinUtils.cmake
index 59d47d7..4947ae4 100644
--- a/cmake/Modules/CompilerRTDarwinUtils.cmake
+++ b/cmake/Modules/CompilerRTDarwinUtils.cmake
@@ -237,11 +237,18 @@
 endfunction()
 
 function(darwin_add_eprintf_library)
+  cmake_parse_arguments(LIB
+    ""
+    ""
+    "CFLAGS"
+    ${ARGN})
+
   add_library(clang_rt.eprintf STATIC eprintf.c)
   set_target_compile_flags(clang_rt.eprintf
     -isysroot ${DARWIN_osx_SYSROOT}
     ${DARWIN_osx_BUILTIN_MIN_VER_FLAG}
-    -arch i386)
+    -arch i386
+    ${LIB_CFLAGS})
   set_target_properties(clang_rt.eprintf PROPERTIES
       OUTPUT_NAME clang_rt.eprintf${COMPILER_RT_OS_SUFFIX})
   set_target_properties(clang_rt.eprintf PROPERTIES
@@ -322,7 +329,7 @@
     endif()
   endforeach()
 
-  darwin_add_eprintf_library()
+  darwin_add_eprintf_library(CFLAGS ${CFLAGS})
 
   # We put the x86 sim slices into the archives for their base OS
   foreach (os ${ARGN})