diff --git a/compiler-rt/include/CMakeLists.txt b/compiler-rt/include/CMakeLists.txt --- a/compiler-rt/include/CMakeLists.txt +++ b/compiler-rt/include/CMakeLists.txt @@ -35,6 +35,12 @@ ) endif(COMPILER_RT_BUILD_XRAY) +if (COMPILER_RT_BUILD_ORC) + set(ORC_HEADERS + orc/c_api.h + ) +endif(COMPILER_RT_BUILD_ORC) + if (COMPILER_RT_BUILD_PROFILE) set(PROFILE_HEADERS profile/InstrProfData.inc @@ -46,6 +52,7 @@ ${FUZZER_HEADERS} ${MEMPROF_HEADERS} ${XRAY_HEADERS} + ${ORC_HEADERS} ${PROFILE_HEADERS}) set(output_dir ${COMPILER_RT_OUTPUT_DIR}/include) @@ -81,6 +88,11 @@ COMPONENT compiler-rt-headers PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ DESTINATION ${COMPILER_RT_INSTALL_INCLUDE_DIR}/xray) +# Install ORC headers. +install(FILES ${ORC_HEADERS} + COMPONENT compiler-rt-headers + PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ + DESTINATION ${COMPILER_RT_INSTALL_INCLUDE_DIR}/orc) # Install profile headers. install(FILES ${PROFILE_HEADERS} COMPONENT compiler-rt-headers diff --git a/compiler-rt/lib/orc/c_api.h b/compiler-rt/include/orc/c_api.h rename from compiler-rt/lib/orc/c_api.h rename to compiler-rt/include/orc/c_api.h diff --git a/compiler-rt/lib/orc/common.h b/compiler-rt/lib/orc/common.h --- a/compiler-rt/lib/orc/common.h +++ b/compiler-rt/lib/orc/common.h @@ -13,8 +13,8 @@ #ifndef ORC_RT_COMMON_H #define ORC_RT_COMMON_H -#include "c_api.h" #include "compiler.h" +#include "orc/c_api.h" #include /// This macro should be used to define tags that will be associated with diff --git a/compiler-rt/lib/orc/macho_ehframe_registration.cpp b/compiler-rt/lib/orc/macho_ehframe_registration.cpp --- a/compiler-rt/lib/orc/macho_ehframe_registration.cpp +++ b/compiler-rt/lib/orc/macho_ehframe_registration.cpp @@ -11,9 +11,9 @@ //===----------------------------------------------------------------------===// #include "adt.h" -#include "c_api.h" #include "common.h" #include "executor_address.h" +#include "orc/c_api.h" #include "wrapper_function_utils.h" using namespace __orc_rt; diff --git a/compiler-rt/lib/orc/unittests/CMakeLists.txt b/compiler-rt/lib/orc/unittests/CMakeLists.txt --- a/compiler-rt/lib/orc/unittests/CMakeLists.txt +++ b/compiler-rt/lib/orc/unittests/CMakeLists.txt @@ -68,7 +68,7 @@ OrcRTUnitTests "${testname}-${arch}-Test" "${arch}" SOURCES ${TEST_SOURCES} ${COMPILER_RT_GTEST_SOURCE} RUNTIME "${ORC_RUNTIME_LIBS}" - COMPILE_DEPS ${TEST_HEADERS} + COMPILE_DEPS ${TEST_HEADERS} ${ORC_HEADERS} DEPS ${ORC_DEPS} CFLAGS ${ORC_UNITTEST_CFLAGS} LINK_FLAGS ${ORC_UNITTEST_LINK_FLAGS}) diff --git a/compiler-rt/lib/orc/wrapper_function_utils.h b/compiler-rt/lib/orc/wrapper_function_utils.h --- a/compiler-rt/lib/orc/wrapper_function_utils.h +++ b/compiler-rt/lib/orc/wrapper_function_utils.h @@ -13,7 +13,7 @@ #ifndef ORC_RT_WRAPPER_FUNCTION_UTILS_H #define ORC_RT_WRAPPER_FUNCTION_UTILS_H -#include "c_api.h" +#include "orc/c_api.h" #include "common.h" #include "error.h" #include "executor_address.h"