Files
llvm/orc-rt/include/CMakeLists.txt
Lang Hames 7ccf968d0b [orc-rt] Add build options for EH and RTTI, and a config.h header. (#172129)
Clients should be able to build the ORC runtime with or without
exceptions/RTTI, and this choice should be able to be made independently
of the corresponding settings for LLVM (e.g. it should be fine to build
LLVM with exceptions/RTTI disabled, and orc-rt with them enabled).

The orc-rt-c/config.h header will provide C defines that can be used by
both the ORC runtime and API clients to determine the value of the
options.

Future patches should build on this work to provide APIs that enable
some interoperability between the ORC runtime's error return mechanism
(Error/Expected) and C++ exceptions.
2025-12-13 17:08:35 +11:00

59 lines
1.6 KiB
CMake

set(ORC_RT_HEADERS
orc-rt-c/CoreTyspe.h
orc-rt-c/ExternC.h
orc-rt-c/WrapperFunction.h
orc-rt-c/orc-rt.h
orc-rt/AllocAction.h
orc-rt/BitmaskEnum.h
orc-rt/Compiler.h
orc-rt/Error.h
orc-rt/ExecutorAddress.h
orc-rt/IntervalMap.h
orc-rt/IntervalSet.h
orc-rt/Math.h
orc-rt/MemoryFlags.h
orc-rt/ResourceManager.h
orc-rt/RTTI.h
orc-rt/ScopeExit.h
orc-rt/Session.h
orc-rt/SimpleNativeMemoryMap.h
orc-rt/SimplePackedSerialization.h
orc-rt/SPSAllocAction.h
orc-rt/SPSMemoryFlags.h
orc-rt/SPSWrapperFunction.h
orc-rt/SPSWrapperFunctionBuffer.h
orc-rt/TaskDispatcher.h
orc-rt/ThreadPoolTaskDispatcher.h
orc-rt/WrapperFunction.h
orc-rt/bind.h
orc-rt/bit.h
orc-rt/move_only_function.h
orc-rt/span.h
)
# Add generated config header
set(ORC_RT_GENERATED_HEADERS
${CMAKE_CURRENT_BINARY_DIR}/orc-rt-c/config.h
)
# TODO: Switch to filesets when we move to cmake-3.23.
add_library(orc-rt-headers INTERFACE)
target_include_directories(orc-rt-headers INTERFACE
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>
$<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/include>
$<INSTALL_INTERFACE:include>
)
set_property(TARGET orc-rt-headers
PROPERTY PUBLIC_HEADER ${ORC_RT_HEADERS} ${ORC_RT_GENERATED_HEADERS}
)
install(TARGETS orc-rt-headers
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/
COMPONENT OrcRT_Development
)
# Install generated config header
install(FILES ${ORC_RT_GENERATED_HEADERS}
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/orc-rt-c/
COMPONENT OrcRT_Development
)