[compiler-rt] r177870 - Add basic support for building profile compiler-rt library in CMake build on Darwin
Alexey Samsonov
samsonov at google.com
Mon Mar 25 07:20:11 PDT 2013
Author: samsonov
Date: Mon Mar 25 09:20:11 2013
New Revision: 177870
URL: http://llvm.org/viewvc/llvm-project?rev=177870&view=rev
Log:
Add basic support for building profile compiler-rt library in CMake build on Darwin
Modified:
compiler-rt/trunk/lib/CMakeLists.txt
compiler-rt/trunk/lib/profile/CMakeLists.txt
Modified: compiler-rt/trunk/lib/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/CMakeLists.txt?rev=177870&r1=177869&r2=177870&view=diff
==============================================================================
--- compiler-rt/trunk/lib/CMakeLists.txt (original)
+++ compiler-rt/trunk/lib/CMakeLists.txt Mon Mar 25 09:20:11 2013
@@ -7,6 +7,7 @@ if(CMAKE_SYSTEM_NAME MATCHES "Darwin|Lin
add_subdirectory(interception)
add_subdirectory(sanitizer_common)
if(NOT ANDROID)
+ add_subdirectory(profile)
add_subdirectory(ubsan)
endif()
endif()
@@ -15,8 +16,6 @@ if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linu
add_subdirectory(tsan)
add_subdirectory(msan)
add_subdirectory(msandr)
- # FIXME: Add support for the profile library on OS X.
- add_subdirectory(profile)
endif()
# The top-level lib directory contains a large amount of C code which provides
Modified: compiler-rt/trunk/lib/profile/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/profile/CMakeLists.txt?rev=177870&r1=177869&r2=177870&view=diff
==============================================================================
--- compiler-rt/trunk/lib/profile/CMakeLists.txt (original)
+++ compiler-rt/trunk/lib/profile/CMakeLists.txt Mon Mar 25 09:20:11 2013
@@ -3,8 +3,12 @@ set(PROFILE_SOURCES
filter_available_targets(PROFILE_SUPPORTED_ARCH x86_64 i386)
-if(NOT APPLE)
- # FIXME: Add support for profile.rt on Mac.
+if(APPLE)
+ add_compiler_rt_osx_static_runtime(clang_rt.profile_osx
+ ARCH ${PROFILE_SUPPORTED_ARCH}
+ SOURCES ${PROFILE_SOURCES}
+ CFLAGS --sysroot=${COMPILER_RT_DARWIN_SDK_SYSROOT})
+else()
foreach(arch ${PROFILE_SUPPORTED_ARCH})
add_compiler_rt_static_runtime(clang_rt.profile-${arch} ${arch}
SOURCES ${PROFILE_SOURCES})
More information about the llvm-commits
mailing list