Skip to content

Commit 671d6e3

Browse files
authored
Update WindowsBuild.md
Add a note about reducing parallel link operations for memory exhaustion when building. Thanks to @BradLarson for pointing out that this may be something that may not be obvious to all users.
1 parent 528764c commit 671d6e3

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

docs/WindowsBuild.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,8 @@ cmake -B "S:\b\1" ^
135135
ninja -C S:\b\1
136136
```
137137

138+
> **NOTE:** Linking with debug information (`-D LLVM_ENABLE_PDB=YES`) is very memory intensive. When building with parallel jobs, it is possible to consume upwards of 32 GiB of RAM. You can append `-D LLVM_PARALLEL_LINK_JOBS=N -D DLLVM_PARALLEL_LINK_JOBS=N` to reduce the number of parallel link operations to `N` which should help reduce the memory pressure. You may need to set this to a low number (e.g. 1) if you see build failures due to memory exhaustion.
139+
138140
## Running Swift tests on Windows
139141

140142
```cmd

0 commit comments

Comments
 (0)