2014-02-18 17:33:45 +08:00
|
|
|
add_custom_target(profile)
|
|
|
|
|
2014-04-23 02:49:32 +08:00
|
|
|
set(PROFILE_SOURCES
|
|
|
|
GCDAProfiling.c
|
|
|
|
InstrProfiling.c
|
|
|
|
InstrProfilingBuffer.c
|
|
|
|
InstrProfilingFile.c
|
|
|
|
InstrProfilingPlatformDarwin.c
|
2015-10-14 02:40:00 +08:00
|
|
|
InstrProfilingPlatformLinux.c
|
2014-04-23 02:49:32 +08:00
|
|
|
InstrProfilingPlatformOther.c
|
2015-07-10 01:21:52 +08:00
|
|
|
InstrProfilingRuntime.cc
|
|
|
|
InstrProfilingUtil.c)
|
2014-03-20 11:57:33 +08:00
|
|
|
|
2014-04-23 02:49:32 +08:00
|
|
|
if(APPLE)
|
2015-08-26 03:53:09 +08:00
|
|
|
add_compiler_rt_runtime(clang_rt.profile
|
|
|
|
STATIC
|
2015-10-01 05:23:22 +08:00
|
|
|
OS ${PROFILE_SUPPORTED_OS}
|
2015-08-26 03:53:09 +08:00
|
|
|
ARCHS ${PROFILE_SUPPORTED_ARCH}
|
|
|
|
SOURCES ${PROFILE_SOURCES}
|
|
|
|
PARENT_TARGET profile)
|
2013-03-25 22:20:11 +08:00
|
|
|
else()
|
2015-08-26 03:53:09 +08:00
|
|
|
add_compiler_rt_runtime(clang_rt.profile
|
|
|
|
STATIC
|
|
|
|
ARCHS ${PROFILE_SUPPORTED_ARCH}
|
|
|
|
CFLAGS -fPIC
|
|
|
|
SOURCES ${PROFILE_SOURCES}
|
|
|
|
PARENT_TARGET profile)
|
2013-03-19 17:17:35 +08:00
|
|
|
endif()
|
2014-02-18 17:33:45 +08:00
|
|
|
|
|
|
|
add_dependencies(compiler-rt profile)
|