Files
swift-mirror/lib/SwiftDemangle/CMakeLists.txt
Rintaro Ishizaki 9c9010e5b7 [CMake] Support Macros in Linux
For compiling codes required for macro support, we now need swiftc
compiler in the build machine.

Unlike Darwin OSes, where swiftCore runtime is guaranteed to be present
in /usr/lib, Linux doesn't have ABI stability and the stdlib of the
build machine is not at the specific location. So the built compiler
cannot relies on the shared object in the toolchain.
2023-08-24 17:04:15 +00:00

27 lines
666 B
CMake

add_swift_host_library(swiftDemangle SHARED
SwiftDemangle.cpp
MangleHack.cpp)
target_compile_definitions(swiftDemangle PRIVATE
LLVM_DISABLE_ABI_BREAKING_CHECKS_ENFORCING=1)
target_link_libraries(swiftDemangle PRIVATE
swiftDemangling)
add_dependencies(compiler swiftDemangle)
swift_install_in_component(TARGETS swiftDemangle
RUNTIME
DESTINATION "bin"
COMPONENT compiler
LIBRARY
DESTINATION "lib${LLVM_LIBDIR_SUFFIX}"
COMPONENT compiler
ARCHIVE
DESTINATION "lib${LLVM_LIBDIR_SUFFIX}"
COMPONENT compiler)
swift_install_strip_builder_rpath(
TARGETS swiftDemangle
DESTINATION "lib${LLVM_LIBDIR_SUFFIX}"
COMPONENT compiler
)