We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bc6dbd4 commit 0c1d8a6Copy full SHA for 0c1d8a6
cmake/modules/AddSwift.cmake
@@ -527,6 +527,11 @@ function(add_swift_host_library name)
527
endif()
528
529
530
+ # If we are compiling in release or release with deb info, compile swift code
531
+ # with -cross-module-optimization enabled.
532
+ target_compile_options(${name} PRIVATE
533
+ $<$<AND:$<COMPILE_LANGUAGE:Swift>,$<OR:$<CONFIG:Release>,$<CONFIG:RelWithDebInfo>>>:-cross-module-optimization>)
534
+
535
add_dependencies(dev ${name})
536
if(NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
537
swift_install_in_component(TARGETS ${name}
0 commit comments