File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -678,8 +678,10 @@ public final class SwiftTargetBuildDescription {
678
678
679
679
result. append ( " -module-name " )
680
680
result. append ( target. c99name)
681
- result . append ( " -incremental " )
681
+
682
682
result. append ( " -emit-dependencies " )
683
+
684
+ // FIXME: Do we always have a module?
683
685
result. append ( " -emit-module " )
684
686
result. append ( " -emit-module-path " )
685
687
result. append ( moduleOutputPath. pathString)
@@ -690,7 +692,14 @@ public final class SwiftTargetBuildDescription {
690
692
if target. type == . library || target. type == . test {
691
693
result. append ( " -parse-as-library " )
692
694
}
693
- // FIXME: WMO
695
+
696
+ if ( buildParameters. configuration == . release) {
697
+ result. append ( " -whole-module-optimization " )
698
+ result. append ( " -num-threads " )
699
+ result. append ( String ( ProcessInfo . processInfo. activeProcessorCount) )
700
+ } else {
701
+ result. append ( " -incremental " )
702
+ }
694
703
695
704
result. append ( " -c " )
696
705
for source in target. sources. paths {
You can’t perform that action at this time.
0 commit comments