diff options
author | Petr Hosek <phosek@google.com> | 2019-11-24 13:23:30 -0800 |
---|---|---|
committer | Petr Hosek <phosek@google.com> | 2019-11-24 13:26:01 -0800 |
commit | e8a4e5892bd83a21451b74ebd0f41129be9f3267 (patch) | |
tree | da9c2acfb95f83b1fc39bfc7f422adfdbfad7c6c | |
parent | 9d24933f79dd7db3e469b3c4402e076cc41418f7 (diff) | |
download | bcm5719-llvm-e8a4e5892bd83a21451b74ebd0f41129be9f3267.tar.gz bcm5719-llvm-e8a4e5892bd83a21451b74ebd0f41129be9f3267.zip |
[CMake] Use correct include path for InstrProfData.inc on Darwin
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.
-rw-r--r-- | compiler-rt/cmake/Modules/CompilerRTDarwinUtils.cmake | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/compiler-rt/cmake/Modules/CompilerRTDarwinUtils.cmake b/compiler-rt/cmake/Modules/CompilerRTDarwinUtils.cmake index 7bef304f9b8..9f501a61c4b 100644 --- a/compiler-rt/cmake/Modules/CompilerRTDarwinUtils.cmake +++ b/compiler-rt/cmake/Modules/CompilerRTDarwinUtils.cmake @@ -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}) @@ -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 @@ -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}) |