summaryrefslogtreecommitdiff
path: root/lib/profile/CMakeLists.txt
diff options
context:
space:
mode:
authorAlexey Samsonov <samsonov@google.com>2013-03-19 09:17:35 +0000
committerAlexey Samsonov <samsonov@google.com>2013-03-19 09:17:35 +0000
commitc9de451e97b85e9712939ac2bfb02295645e2e0f (patch)
tree7ae0943977a36b33ddd6b142156c44efef72163e /lib/profile/CMakeLists.txt
parent210ce0ee0190170ca6fab6f5d953885ce5f9ac89 (diff)
downloadcompiler-rt-c9de451e97b85e9712939ac2bfb02295645e2e0f.tar.gz
compiler-rt-c9de451e97b85e9712939ac2bfb02295645e2e0f.tar.bz2
compiler-rt-c9de451e97b85e9712939ac2bfb02295645e2e0f.tar.xz
Support CMake build of profile runtime library on Linux
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@177382 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/profile/CMakeLists.txt')
-rw-r--r--lib/profile/CMakeLists.txt13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/profile/CMakeLists.txt b/lib/profile/CMakeLists.txt
new file mode 100644
index 00000000..70fc1750
--- /dev/null
+++ b/lib/profile/CMakeLists.txt
@@ -0,0 +1,13 @@
+set(PROFILE_SOURCES
+ GCDAProfiling.c)
+
+filter_available_targets(PROFILE_SUPPORTED_ARCH x86_64 i386)
+
+if(NOT APPLE)
+ # FIXME: Add support for profile.rt on Mac.
+ foreach(arch ${PROFILE_SUPPORTED_ARCH})
+ add_compiler_rt_static_runtime(clang_rt.profile-${arch} ${arch}
+ SOURCES ${PROFILE_SOURCES}
+ CFLAGS --sysroot=${COMPILER_RT_LINUX_SDK_SYSROOT})
+ endforeach()
+endif()