diff --git a/cmake/modules/AddPureSwift.cmake b/cmake/modules/AddPureSwift.cmake index 52cdfc3f66e7e..c37037762c500 100644 --- a/cmake/modules/AddPureSwift.cmake +++ b/cmake/modules/AddPureSwift.cmake @@ -28,6 +28,10 @@ function(_add_host_swift_compile_options name) "$<$:SHELL:-Xfrontend -disable-implicit-string-processing-module-import>") endif() + # Emitting module seprately doesn't give us any benefit. + target_compile_options(${name} PRIVATE + "$<$:-no-emit-module-separately-wmo>") + if(SWIFT_ANALYZE_CODE_COVERAGE) set(_cov_flags $<$:-profile-generate -profile-coverage-mapping>) target_compile_options(${name} PRIVATE ${_cov_flags})