Files
swift-mirror/tools/swift-compatibility-symbols/CMakeLists.txt
Evan Wilde eeee0dfddd CMake: option to disable swift in swift
Adding `SWIFT_ENABLE_SWIFT_IN_SWIFT` option to enable or disable the
parts of Swift that require a Swift compiler to build. This is meant for
bootstrapping compilers on new platforms and is not guaranteed to result
in a compiler that will pass the test suite.

This option is on by default so that folks won't forget.
If the option is off, the resulting compiler does not include the Swift
optimizer sources in SwiftCompilerSources nor does the resulting
compiler have swift macro support.
2025-03-06 13:32:49 -08:00

32 lines
711 B
CMake

add_swift_host_tool(swift-compatibility-symbols
swift-compatibility-symbols.cpp
LLVM_LINK_COMPONENTS support
SWIFT_COMPONENT tools
DOES_NOT_USE_SWIFT
)
if(SWIFT_NATIVE_SWIFT_TOOLS_PATH)
set(syms_file "${CMAKE_BINARY_DIR}/share/swift/compatibility-symbols")
add_custom_command_target(copy_compat_target
COMMAND
"${SWIFT_NATIVE_SWIFT_TOOLS_PATH}/swift-compatibility-symbols"
--output-filename ${syms_file}
OUTPUT
${syms_file}
DEPENDS
swift-compatibility-symbols
)
add_dependencies(swift-frontend "${copy_compat_target}")
swift_install_in_component(
FILES
${syms_file}
DESTINATION
"share/swift"
COMPONENT
compiler
)
endif()