mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
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.
27 lines
666 B
CMake
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
|
|
)
|