File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -35,11 +35,14 @@ if(NOT SWIFT_SYSTEM_NAME)
35
35
endif ()
36
36
endif ()
37
37
38
- # Enable whole module optimization for release builds & incremental for debug builds
39
- if (POLICY CMP0157 )
40
- set (CMAKE_Swift_COMPILATION_MODE "$<IF:$<CONFIG:Release>,wholemodule,incremental>" )
41
- else ()
42
- add_compile_options ($< $< AND:$< COMPILE_LANGUAGE:Swift> ,$< CONFIG:Release> > :-wmo> )
38
+ # Don't enable WMO on Windows due to linker failures
39
+ if (NOT CMAKE_SYSTEM_NAME STREQUAL Windows )
40
+ # Enable whole module optimization for release builds & incremental for debug builds
41
+ if (POLICY CMP0157 )
42
+ set (CMAKE_Swift_COMPILATION_MODE "$<IF:$<CONFIG:Release>,wholemodule,incremental>" )
43
+ else ()
44
+ add_compile_options ($< $< AND:$< COMPILE_LANGUAGE:Swift> ,$< CONFIG:Release> > :-wmo> )
45
+ endif ()
43
46
endif ()
44
47
45
48
set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR} /lib )
You can’t perform that action at this time.
0 commit comments