summaryrefslogtreecommitdiff
path: root/lib/profile/CMakeLists.txt
diff options
context:
space:
mode:
authorAlexey Samsonov <samsonov@google.com>2013-03-25 14:20:11 +0000
committerAlexey Samsonov <samsonov@google.com>2013-03-25 14:20:11 +0000
commit4df99d2565a29889ca23a7cc11ed73e3c055b751 (patch)
treedebafd6ff4481305e68033de70302abd7dd5c641 /lib/profile/CMakeLists.txt
parentbff55c4fbebd1f8f64693dea8118d9ee0979d563 (diff)
Add basic support for building profile compiler-rt library in CMake build on Darwin
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@177870 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/profile/CMakeLists.txt')
-rw-r--r--lib/profile/CMakeLists.txt8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/profile/CMakeLists.txt b/lib/profile/CMakeLists.txt
index a9355857e..641f085c8 100644
--- a/lib/profile/CMakeLists.txt
+++ b/lib/profile/CMakeLists.txt
@@ -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})