Skip to content

Commit

Permalink
Remove -incremental when using -whole-module-optimization
Browse files Browse the repository at this point in the history
Passing both results in noisy remarks when building from the command line like:

```
remark: Incremental compilation has been disabled: it is not compatible with whole module optimization
```

https://forums.swift.org/t/incremental-compilation-has-been-disabled-it-is-not-compatible-with-whole-module-optimization/66092
  • Loading branch information
keith committed Jul 19, 2023
1 parent a0c5e54 commit 0c2e0dd
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/BuildSystem/BuildSystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2583,8 +2583,7 @@ class SwiftCompilerShellCommand : public ExternalCommand {
result.push_back("-module-alias");
result.push_back(nameAndAlias);
}

result.push_back("-incremental");

result.push_back("-emit-dependencies");
if (!moduleOutputPath.empty()) {
result.push_back("-emit-module");
Expand All @@ -2600,6 +2599,8 @@ class SwiftCompilerShellCommand : public ExternalCommand {
result.push_back("-whole-module-optimization");
result.push_back("-num-threads");
result.push_back(numThreads);
} else {
result.push_back("-incremental");
}
result.push_back("-c");
for (const auto& source: sourcesList) {
Expand Down

0 comments on commit 0c2e0dd

Please sign in to comment.