Skip to content

Commit

Permalink
[CMake] Use correct include path for InstrProfData.inc on Darwin
Browse files Browse the repository at this point in the history
On Darwin, part of the profile runtime is included in the builtin
library. f35032e changed the location of InstrProfData.inc but the
builtin build for Darwin hasn't been updated to include the new
path which causes a breakage when building for Darwin. This change
addresses this breakage.
  • Loading branch information
petrhosek committed Nov 24, 2019
1 parent 9d24933 commit e8a4e58
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion compiler-rt/cmake/Modules/CompilerRTDarwinUtils.cmake
Expand Up @@ -245,7 +245,7 @@ macro(darwin_add_builtin_library name suffix)
cmake_parse_arguments(LIB
""
"PARENT_TARGET;OS;ARCH"
"SOURCES;CFLAGS;DEFS"
"SOURCES;CFLAGS;DEFS;INCLUDE_DIRS"
${ARGN})
set(libname "${name}.${suffix}_${LIB_ARCH}_${LIB_OS}")
add_library(${libname} STATIC ${LIB_SOURCES})
Expand All @@ -269,6 +269,8 @@ macro(darwin_add_builtin_library name suffix)
${sysroot_flag}
${DARWIN_${LIB_OS}_BUILTIN_MIN_VER_FLAG}
${builtin_cflags})
target_include_directories(${libname}
PRIVATE ${LIB_INCLUDE_DIRS})
set_property(TARGET ${libname} APPEND PROPERTY
COMPILE_DEFINITIONS ${LIB_DEFS})
set_target_properties(${libname} PROPERTIES
Expand Down Expand Up @@ -373,6 +375,7 @@ macro(darwin_add_builtin_libraries)
SOURCES ${filtered_sources} ${PROFILE_SOURCES}
CFLAGS ${CFLAGS} -arch ${arch} -mkernel
DEFS KERNEL_USE
INCLUDE_DIRS ../../include
PARENT_TARGET builtins)
endforeach()
set(archive_name clang_rt.cc_kext_${os})
Expand Down

0 comments on commit e8a4e58

Please sign in to comment.