Commit 955dc96
authored
build: parallelize native compile with xargs -P, not batch-and-wait (#78)
The previous loop backgrounded JOBS compiles then `wait`ed for the whole
batch before starting the next JOBS - one slow TU idles every other core
until the batch drains. Worse, a failing background zig cc under `&` was
invisible to set -e (bare `wait` returns 0 regardless of child exit
status), so a broken compile silently produced no .o and only surfaced
later as a cryptic link error.
xargs -P keeps all JOBS slots continuously saturated (no batch boundary)
and propagates a non-zero exit from any invocation, which set -e now
catches immediately.1 parent 65f48f7 commit 955dc96
1 file changed
Lines changed: 14 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
142 | 148 | | |
143 | 149 | | |
144 | 150 | | |
| |||
0 commit comments