Commit 7056308
committed
Error on insufficient optimization record paths with multi-threaded WMO
In multi-threaded whole module optimization mode, using fewer than N
-save-optimization-record-path arguments for N input files causes
multiple threads to attempt writing to the same file, which is invalid.
This commit adds a diagnostic to catch this error case and provides
guidance to users: they must either specify one path per input file,
use an output file map, or use single-threaded compilation.
Key bug fix: The check now correctly counts actual path arguments
instead of checking for the presence of any optimization record flag.
Previously, the format flag -save-optimization-record=<format> was
incorrectly treated as providing a path, causing false positives.1 parent 17da56c commit 7056308
File tree
2 files changed
+16
-0
lines changed- Sources/SwiftDriver
- Jobs
- Utilities
2 files changed
+16
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
271 | 271 | | |
272 | 272 | | |
273 | 273 | | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
274 | 286 | | |
275 | 287 | | |
276 | 288 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
182 | 182 | | |
183 | 183 | | |
184 | 184 | | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
185 | 189 | | |
0 commit comments