summaryrefslogtreecommitdiff
path: root/lib/profile/CMakeLists.txt
diff options
context:
space:
mode:
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()