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 8bf4cb0 commit 1703544Copy full SHA for 1703544
CMakeLists.txt
@@ -112,6 +112,13 @@ if(CMAKE_SYSTEM_NAME STREQUAL "WASI")
112
"SHELL:$<$<COMPILE_LANGUAGE:Swift>:-Xcc -D_WASI_EMULATED_MMAN>")
113
endif()
114
115
+# Enable whole module optimization for release builds & incremental for debug builds
116
+if(POLICY CMP0157)
117
+ set(CMAKE_Swift_COMPILATION_MODE "$<IF:$<CONFIG:Release>,wholemodule,incremental>")
118
+else()
119
+ add_compile_options($<$<AND:$<COMPILE_LANGUAGE:Swift>,$<IF:$<CONFIG:Release>>>:-wmo>)
120
+endif()
121
+
122
include(GNUInstallDirs)
123
include(SwiftFoundationSwiftSupport)
124
0 commit comments