From 7146f7bcf93dc52b15ab7581e0879424ff04583a Mon Sep 17 00:00:00 2001 From: Chris Bieneman Date: Thu, 24 Sep 2015 22:29:58 +0000 Subject: [PATCH] [CMake] [darwin] [cc_kext] In addition to builtin sources the cc_kext builtins include some functions from clang_rt.profile. llvm-svn: 248548 --- compiler-rt/cmake/Modules/CompilerRTDarwinUtils.cmake | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/compiler-rt/cmake/Modules/CompilerRTDarwinUtils.cmake b/compiler-rt/cmake/Modules/CompilerRTDarwinUtils.cmake index b2ad51a324c4..baf890bae004 100644 --- a/compiler-rt/cmake/Modules/CompilerRTDarwinUtils.cmake +++ b/compiler-rt/cmake/Modules/CompilerRTDarwinUtils.cmake @@ -230,19 +230,22 @@ macro(darwin_add_builtin_libraries) set(CMAKE_C_FLAGS "-fPIC -fvisibility=hidden -DVISIBILITY_HIDDEN -Wall -fomit-frame-pointer") set(CMAKE_CXX_FLAGS ${CMAKE_C_FLAGS}) set(CMAKE_ASM_FLAGS ${CMAKE_C_FLAGS}) + + set(PROFILE_SOURCES ../profile/InstrProfiling + ../profile/InstrProfilingBuffer + ../profile/InstrProfilingPlatformDarwin) foreach (os ${ARGN}) list_union(DARWIN_BUILTIN_ARCHS DARWIN_${os}_ARCHS BUILTIN_SUPPORTED_ARCH) foreach (arch ${DARWIN_BUILTIN_ARCHS}) - # do cc_kext + # In addition to the builtins cc_kext includes some profile sources darwin_add_builtin_library(clang_rt cc_kext OS ${os} ARCH ${arch} - SOURCES ${${arch}_SOURCES} + SOURCES ${${arch}_SOURCES} ${PROFILE_SOURCES} CFLAGS -arch ${arch} -mkernel DEFS KERNEL_USE PARENT_TARGET builtins) - darwin_find_excluded_builtins_list(${arch}_${os}_EXCLUDED_BUILTINS OS ${os} ARCH ${arch}