summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Bieneman <beanz@apple.com>2015-10-09 22:40:50 +0000
committerChris Bieneman <beanz@apple.com>2015-10-09 22:40:50 +0000
commit626f6a057c859389aa6eee7b5e3bb1dfc5e26b06 (patch)
treec79be2edf6c408c2e865241ac97725202856aa25
parent0ed9bc1995b5922ff4b6c8766fce7b322cb91864 (diff)
downloadbcm5719-llvm-626f6a057c859389aa6eee7b5e3bb1dfc5e26b06.tar.gz
bcm5719-llvm-626f6a057c859389aa6eee7b5e3bb1dfc5e26b06.zip
[CMake] Adding support for generating libclang_rt.eprintf.a
This library provides eprintf for i386 on OS X versions later than 10.4. llvm-svn: 249913
-rw-r--r--compiler-rt/cmake/Modules/CompilerRTDarwinUtils.cmake19
1 files changed, 19 insertions, 0 deletions
diff --git a/compiler-rt/cmake/Modules/CompilerRTDarwinUtils.cmake b/compiler-rt/cmake/Modules/CompilerRTDarwinUtils.cmake
index 1e8ebdacd1e..c52ba09b8f2 100644
--- a/compiler-rt/cmake/Modules/CompilerRTDarwinUtils.cmake
+++ b/compiler-rt/cmake/Modules/CompilerRTDarwinUtils.cmake
@@ -229,6 +229,23 @@ function(darwin_filter_builtin_sources output_var exclude_or_include excluded_li
set(${output_var} ${intermediate} PARENT_SCOPE)
endfunction()
+function(darwin_add_eprintf_library)
+ 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)
+ set_target_properties(clang_rt.eprintf PROPERTIES
+ OUTPUT_NAME clang_rt.eprintf${COMPILER_RT_OS_SUFFIX})
+ set_target_properties(clang_rt.eprintf PROPERTIES
+ OSX_ARCHITECTURES i386)
+ add_dependencies(builtins clang_rt.eprintf)
+ set_target_properties(clang_rt.eprintf PROPERTIES
+ ARCHIVE_OUTPUT_DIRECTORY ${COMPILER_RT_LIBRARY_OUTPUT_DIR})
+ install(TARGETS clang_rt.eprintf
+ ARCHIVE DESTINATION ${COMPILER_RT_LIBRARY_INSTALL_DIR})
+endfunction()
+
# Generates builtin libraries for all operating systems specified in ARGN. Each
# OS library is constructed by lipo-ing together single-architecture libraries.
macro(darwin_add_builtin_libraries)
@@ -306,6 +323,8 @@ macro(darwin_add_builtin_libraries)
endif()
endforeach()
+ darwin_add_eprintf_library()
+
# We put the x86 sim slices into the archives for their base OS
foreach (os ${ARGN})
if(NOT ${os} MATCHES ".*sim$")
OpenPOWER on IntegriCloud