llvm-project/compiler-rt/lib/profile/CMakeLists.txt

33 lines
841 B
CMake

add_custom_target(profile)
if(APPLE)
set(PROFILE_SOURCES
GCDAProfiling.c
InstrProfiling.c
InstrProfilingBuffer.c
InstrProfilingFile.c
InstrProfilingPlatformDarwin.c
InstrProfilingRuntime.cc)
add_compiler_rt_osx_static_runtime(clang_rt.profile_osx
ARCH ${PROFILE_SUPPORTED_ARCH}
SOURCES ${PROFILE_SOURCES})
add_dependencies(profile clang_rt.profile_osx)
else()
set(PROFILE_SOURCES
GCDAProfiling.c
InstrProfiling.c
InstrProfilingBuffer.c
InstrProfilingFile.c
InstrProfilingPlatformOther.c
InstrProfilingRuntime.cc)
foreach(arch ${PROFILE_SUPPORTED_ARCH})
add_compiler_rt_runtime(clang_rt.profile-${arch} ${arch} STATIC
SOURCES ${PROFILE_SOURCES})
add_dependencies(profile clang_rt.profile-${arch})
endforeach()
endif()
add_dependencies(compiler-rt profile)