aboutsummaryrefslogtreecommitdiff
path: root/lib/profile/CMakeLists.txt
blob: 641f085c883f4828757d97c44960997bbf76bb32 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
set(PROFILE_SOURCES
  GCDAProfiling.c)

filter_available_targets(PROFILE_SUPPORTED_ARCH x86_64 i386)

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})
  endforeach()
endif()