Introduce common infrastructure for runtimes that determines compiler
resource path locations. These variables introduced are:
* RUNTIMES_OUTPUT_RESOURCE_DIR
* RUNTIMES_INSTALL_RESOURCE_PATH
That contain the location for the compiler resource path (typically
`lib/clang/<version>`) in the build tree and the install tree (the
latter relative to CMAKE_INSTALL_PREFIX).
Additionally, define
* RUNTIMES_OUTPUT_RESOURCE_LIB_DIR
* RUNTIMES_INSTALL_RESOURCE_LIB_PATH
as for the location of clang/flang version-locked libraries (typically
`lib${LLVM_LIBDIR_SUFFIX}/<targer-triple>`, but also depends on `APPLE`
and `LLVM_ENABLE_PER_TARGET_RUNTIME_DIR`). This code is moved from
flang-rt and initially becomes its only user.
Refactored out of #171610 as requested
[here](https://github.com/llvm/llvm-project/pull/171610#discussion_r2687382481).
Extracted `get_runtimes_target_libdir_common` from compiler-rt as
requested
[here](https://github.com/llvm/llvm-project/pull/171610#discussion_r2689565634).
Added TODO comments to all runtimes as requested
[here](https://github.com/llvm/llvm-project/pull/171610#issuecomment-3789598635).
31 lines
805 B
CMake
31 lines
805 B
CMake
set(files
|
|
AllocAction.cpp
|
|
BootstrapInfo.cpp
|
|
SimpleSymbolTable.cpp
|
|
Error.cpp
|
|
ExecutorProcessInfo.cpp
|
|
QueueingTaskDispatcher.cpp
|
|
RTTI.cpp
|
|
Service.cpp
|
|
Session.cpp
|
|
SimpleNativeMemoryMap.cpp
|
|
TaskDispatcher.cpp
|
|
ThreadPoolTaskDispatcher.cpp
|
|
sps-ci/AllSPSCI.cpp
|
|
sps-ci/SimpleNativeMemoryMapSPSCI.cpp
|
|
)
|
|
|
|
add_library(orc-rt-executor STATIC ${files})
|
|
target_link_libraries(orc-rt-executor
|
|
PUBLIC orc-rt-headers
|
|
)
|
|
|
|
# Apply RTTI and exceptions compile flags
|
|
# TODO: Use common runtimes infrastructure for output and install paths
|
|
target_compile_options(orc-rt-executor PRIVATE ${ORC_RT_COMPILE_FLAGS})
|
|
install(TARGETS orc-rt-executor
|
|
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
|
COMPONENT OrcRT_Development
|
|
PUBLIC_HEADER DESTINATION include COMPONENT OrcRT_Development
|
|
)
|