Files
swift-mirror/tools/swift-remoteast-test/CMakeLists.txt
Eric Miotto f417630054 Add option to reduce build times when using ThinLTO and ld64 (#41058)
Internal configurations targeting Darwin employ ThinLTO to
improve compiler performance, however using it on all executable
causes build time to increase with no matching benefit.

To reduce build times in such configurations, we allow some
ancillary targets to opt out of LLVM IR optimizations when linking
ThinLTO with ld64 (e.g. tools used for bootstrapping or debugging the
Swift compiler) -- this behaviour is opt in through a new flag
`--swift-tools-ld64-lto-codegen-only-for-supporting-targets`.

Addresses rdar://76702687
2022-02-09 08:22:02 -08:00

17 lines
536 B
CMake

add_swift_host_tool(swift-remoteast-test
swift-remoteast-test.cpp
SWIFT_COMPONENT testsuite-tools
THINLTO_LD64_ADD_FLTO_CODEGEN_ONLY
)
target_link_libraries(swift-remoteast-test
PRIVATE
swiftFrontendTool
swiftRemoteAST)
set_target_properties(swift-remoteast-test PROPERTIES ENABLE_EXPORTS 1)
# If building as part of clang, make sure the headers are installed.
if(NOT SWIFT_BUILT_STANDALONE)
add_dependencies(swift-frontend clang-resource-headers)
endif()