Repository navigation
build: shrink windows-debug build dirs (thin archives, -g1 fleet, shallow deps) - #4880
Conversation
…llow deps) A fully built windows-debug dir was 29.5 GB. MinGW archives copied every object twice (static libs plus the per-exe objects.a CMake builds for long link lines), so the archives now use thin `ar T` via a rules-override file that also reaches FetchContent subprojects. That alone brings it to 24.6 GB. Full -g repeats the statically linked engine's DWARF in every exe; gcc rejects -gz and MinGW ld/objcopy cannot compress PE debug sections. The new IRREDEN_DEBUG_INFO cache var (FULL default, LINES = -g1) keeps file:line backtraces; fleet-up exports LINES to panes, giving 8.8 GB. FetchContent deps clone shallow (tag/branch refs) and enkiTS comes from a SHA256-checked archive, so _deps stops carrying ~550 MB of history. miniaudio is EXCLUDE_FROM_ALL: none of its targets are linked, and its libvorbis DLL broke `all` on MinGW hosts with MSYS2 libvorbis installed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jakildev
left a comment
There was a problem hiding this comment.
Review — build: shrink windows-debug build dirs (thin archives, -g1 fleet, shallow deps)
Verdict: needs-fix
The build-footprint approach is coherent: the MinGW-only rule override is scoped before project(), the debug-info cache keeps the human default at FULL, the fleet environment propagation has focused coverage, and the enkiTS archive path remains hash-pinned. I found one merge-gating validator failure.
Needs-fix
docs/agents/BUILD.md:253— the added debug-info material grows this instruction file to 426 lines against its 400-line budget, outside the permitted 10-line band. The head’sinstruction-sizecheck fails on this exact file, and I reproduced it withpython3 scripts/lint_instruction_size.py --against origin/master(exit 1). Please condense the new material enough to return within the ratchet, or explicitly update the baseline if the larger canonical instruction surface is deliberate; then rerun the validator.
Validation reviewed
bash scripts/fleet/tests/test_fleet_up_pane_launch_env.sh— 13 passed, 0 failed (exit 0).bash scripts/fleet/tests/test_fleet_up_gh_accounting.sh— 46 passed, 0 failed (exit 0).git diff --check origin/master...HEAD— exit 0.- Current CI: instruction-size failed; linux-build, fleet-tests, and perf-gate were still pending when reviewed. Other completed checks were green.
Praise
- The thin-archive replacement covers both ordinary static libraries and CMake’s MinGW
objects.along-command-line workaround, while remaining idempotent when the override is loaded for multiple languages. - Renaming the enkiTS override avoids accidentally treating an old cached commit SHA as a shallow branch/tag ref.
🤖 Reviewed by Codex GPT-5 (review-pr skill; opus-class final pass)
Opus recheck not required (reviewed at opus class).
Perf gateHead host slug: perf comparison: 9557153 → 6b2330f-cibaseline: host calibration
thresholds: regress ≥ 10%, improve ≥ 5% voxel cull effectiveness
frame timing (ms)
GPU frame timing (ms; separate from stage samples)
GPU stage timing (avg ms per sampled invocation)
top CPU systems by avg ms (head)
|
| pipeline | system | avg ms (base→head) |
|---|---|---|
| RENDER | SingleVoxelToCanvasFirst |
246.854 → 256.926 (+4.1%) |
| RENDER | ComputeLightVolume |
33.089 → 34.292 (+3.6%) |
| RENDER | CanvasToFramebuffer |
17.303 → 17.544 (+1.4%) |
| RENDER | BakeSunShadowMap |
9.493 → 10.277 (+8.3%) |
| RENDER | ComputeSunShadow |
7.826 → 7.894 (+0.9%) |
| UPDATE | PropagateTransform |
4.444 → 4.584 (+3.2%) |
| UPDATE | FogRevealEval |
4.251 → 4.221 (-0.7%) |
| RENDER | ComputeVoxelAO |
3.994 → 3.970 (-0.6%) |
target=IRLuaPerfGrid,zoom=4,sub_mode=full,sub_base=1
| pipeline | system | avg ms (base→head) |
|---|---|---|
| RENDER | SingleVoxelToCanvasFirst |
1029.388 → 1029.410 (+0.0%) |
| RENDER | ComputeLightVolume |
29.437 → 29.165 (-0.9%) |
| RENDER | ComputeSunShadow |
21.807 → 21.539 (-1.2%) |
| RENDER | CanvasToFramebuffer |
16.427 → 16.380 (-0.3%) |
| RENDER | ComputeVoxelAO |
9.553 → 9.381 (-1.8%) |
| RENDER | BakeSunShadowMap |
8.723 → 8.658 (-0.7%) |
| RENDER | LightingToTrixel |
8.431 → 8.288 (-1.7%) |
| UPDATE | PropagateTransform |
4.525 → 4.425 (-2.2%) |
target=IRPerfGrid,zoom=1,sub_mode=full,sub_base=1
| pipeline | system | avg ms (base→head) |
|---|---|---|
| RENDER | SingleVoxelToCanvasFirst |
291.808 → 290.675 (-0.4%) |
| RENDER | ComputeSunShadow |
57.890 → 55.016 (-5.0%) |
| RENDER | LightingToTrixel |
37.677 → 35.913 (-4.7%) |
| RENDER | ComputeLightVolume |
32.943 → 32.644 (-0.9%) |
| RENDER | BakeSunShadowMap |
23.010 → 22.625 (-1.7%) |
| RENDER | CanvasToFramebuffer |
17.714 → 17.672 (-0.2%) |
| RENDER | FogToTrixel |
7.272 → 7.067 (-2.8%) |
| UPDATE | PropagateTransform |
6.270 → 6.404 (+2.1%) |
target=IRPerfGrid,zoom=4,sub_mode=full,sub_base=1
| pipeline | system | avg ms (base→head) |
|---|---|---|
| RENDER | SingleVoxelToCanvasFirst |
1463.424 → 1458.880 (-0.3%) |
| RENDER | ComputeLightVolume |
29.476 → 29.648 (+0.6%) |
| RENDER | ComputeSunShadow |
19.108 → 18.288 (-4.3%) |
| RENDER | CanvasToFramebuffer |
16.257 → 16.034 (-1.4%) |
| RENDER | BakeSunShadowMap |
8.716 → 8.857 (+1.6%) |
| RENDER | ComputeVoxelAO |
7.771 → 7.637 (-1.7%) |
| RENDER | LightingToTrixel |
6.805 → 6.686 (-1.7%) |
| UPDATE | PropagateTransform |
6.350 → 6.340 (-0.2%) |
The debug-info section pushed docs/agents/BUILD.md to 426 lines (budget 400, band 10). Keep a two-line gdb pointer in BUILD.md and move the compressed-DWARF dead-end note into the IRREDEN_DEBUG_INFO comment in the root CMakeLists.txt; the thin-archive rationale already lives in cmake/ir_make_rules_override.cmake. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Addressed feedback (head
— worker (pool-7) |
jakildev
left a comment
There was a problem hiding this comment.
Re-review — build: shrink windows-debug build dirs (thin archives, -g1 fleet, shallow deps)
Verdict: approve
Prior-review resolution
- ✅
docs/agents/BUILD.md:253— the instruction-size ratchet failure is fixed at0c543821e. The amended file is 410 lines against the 400-line budget, within the permitted 10-line warning band;python3 scripts/lint_instruction_size.py --against origin/masterexits 0 and the current-headinstruction-sizecheck passes.
Delta review
- The post-review delta is limited to
docs/agents/BUILD.mdand the rootCMakeLists.txt: the operational gdb guidance remains in the build reference, while the MinGW compressed-DWARF rationale moved beside theIRREDEN_DEBUG_INFOimplementation. No unrelated executable-code change was introduced. git diff --check origin/master...HEADexits 0.- Current-head
changes,closes-lint,comment-refs,format-check,header-checks,instruction-size,no-plan-files,python-lint, andwhitespacechecks pass.linux-build,fleet-tests, andperf-gateare still pending and are not claimed as green here.
No blockers, needs-fix findings, or amend-worthy nits remain in the reviewed delta.
🤖 Reviewed by Codex GPT-5 (review-pr skill; opus-class final pass)
Opus recheck not required (reviewed at opus class).
|
Cross-host smoke OK on macos (fresh checkout + IRShapeDebug --auto-screenshot 10 — build clean, exit 0, no log warnings). |
Perf gateHead host slug: perf comparison: a39c8ac → 2eb37cf-cibaseline: host calibration
thresholds: regress ≥ 10%, improve ≥ 5% voxel cull effectiveness
frame timing (ms)
GPU frame timing (ms; separate from stage samples)
GPU stage timing (avg ms per sampled invocation)
top CPU systems by avg ms (head)
|
| pipeline | system | avg ms (base→head) |
|---|---|---|
| RENDER | SingleVoxelToCanvasFirst |
256.310 → 253.736 (-1.0%) |
| RENDER | ComputeLightVolume |
34.529 → 33.999 (-1.5%) |
| RENDER | CanvasToFramebuffer |
17.421 → 17.085 (-1.9%) |
| RENDER | BakeSunShadowMap |
10.231 → 9.967 (-2.6%) |
| RENDER | ComputeSunShadow |
7.654 → 7.648 (-0.1%) |
| UPDATE | PropagateTransform |
4.943 → 5.204 (+5.3%) |
| UPDATE | FogRevealEval |
4.273 → 4.214 (-1.4%) |
| RENDER | ComputeVoxelAO |
4.086 → 3.983 (-2.5%) |
target=IRLuaPerfGrid,zoom=4,sub_mode=full,sub_base=1
| pipeline | system | avg ms (base→head) |
|---|---|---|
| RENDER | SingleVoxelToCanvasFirst |
1027.979 → 1028.855 (+0.1%) |
| RENDER | ComputeLightVolume |
29.161 → 29.316 (+0.5%) |
| RENDER | ComputeSunShadow |
21.416 → 21.445 (+0.1%) |
| RENDER | CanvasToFramebuffer |
16.262 → 15.968 (-1.8%) |
| RENDER | ComputeVoxelAO |
9.306 → 9.164 (-1.5%) |
| RENDER | BakeSunShadowMap |
8.616 → 8.638 (+0.3%) |
| RENDER | LightingToTrixel |
8.543 → 8.231 (-3.7%) |
| UPDATE | PropagateTransform |
4.472 → 4.475 (+0.1%) |
target=IRPerfGrid,zoom=1,sub_mode=full,sub_base=1
| pipeline | system | avg ms (base→head) |
|---|---|---|
| RENDER | SingleVoxelToCanvasFirst |
290.147 → 293.612 (+1.2%) |
| RENDER | ComputeSunShadow |
55.651 → 53.868 (-3.2%) |
| RENDER | LightingToTrixel |
35.503 → 34.666 (-2.4%) |
| RENDER | ComputeLightVolume |
32.468 → 32.614 (+0.4%) |
| RENDER | BakeSunShadowMap |
22.592 → 22.302 (-1.3%) |
| RENDER | CanvasToFramebuffer |
17.400 → 17.383 (-0.1%) |
| RENDER | FogToTrixel |
7.108 → 6.994 (-1.6%) |
| UPDATE | PropagateTransform |
6.358 → 6.133 (-3.5%) |
target=IRPerfGrid,zoom=4,sub_mode=full,sub_base=1
| pipeline | system | avg ms (base→head) |
|---|---|---|
| RENDER | SingleVoxelToCanvasFirst |
1459.634 → 1459.920 (+0.0%) |
| RENDER | ComputeLightVolume |
29.423 → 29.193 (-0.8%) |
| RENDER | ComputeSunShadow |
18.270 → 18.110 (-0.9%) |
| RENDER | CanvasToFramebuffer |
16.184 → 16.076 (-0.7%) |
| RENDER | BakeSunShadowMap |
8.842 → 8.870 (+0.3%) |
| RENDER | ComputeVoxelAO |
7.740 → 7.795 (+0.7%) |
| RENDER | LightingToTrixel |
6.894 → 6.647 (-3.6%) |
| UPDATE | PropagateTransform |
6.141 → 6.256 (+1.9%) |
Summary
A fully built
windows-debugdir (MinGW Makefiles, MSYS2 g++ 15.2, all 94 exes) measured 29.5 GB. This PR cuts it to 24.6 GB with no change for interactive debugging, and to 8.8 GB for the fleet (−70%).cmake/ir_make_rules_override.cmake, wired viaCMAKE_USER_MAKE_RULES_OVERRIDE). MinGW stored every object twice: once in its static lib, and again in theobjects.athat CMake's Windows-GNU link rule builds for each exe.IrredenEngineTest's copy alone was 1.97 GB. The override switchesar qctoar qcT, so archives reference the.objfiles instead of copying them. It runs after everyproject(), so FetchContent subprojects are covered too (checked on enkiTS'slink.txt). It only applies whenMINGWis set; Linux and macOS rules are untouched.IRREDEN_DEBUG_INFOcache var:FULL(default,-g) orLINES(-g1).fleet-upexportsLINESand seeds it into the tmux global env, as it already does forIR_FLEET_WORKERS, so panes get it even on a server that started before fleet-up ran. The env var only seeds a build dir's first configure. Existing pool dirs have no entry yet, so they pick it up on their next reconfigure, which this PR's CMake edits trigger anyway. A human shell configuresFULL.GIT_SHALLOW TRUE. enkiTS was the one dep pinned to a SHA (GIT_SHALLOW FALSE). It now fetchesarchive/<sha>.tar.gzwith aURL_HASH SHA256. The override knob is renamedIR_ENKITS_GIT_REF, which shallow-clones a branch or tag. The rename keeps an old cached SHA value from being shallow-cloned by mistake.EXCLUDE_FROM_ALL. None of its targets are linked (we use the single header). On this host itsminiaudio_libvorbisDLL brokeallon master: it doesn't link the ma_* core symbols it references, and it gets built whenever MSYS2's libvorbis is installed.Debug-info options measured (step 1 of the task)
-gz-gz is not supported in this configuration-Wl,--compress-debug-sections=zlibunrecognized option(PE has no support)objcopy --compress-debug-sectionspost-linkunsupported on 't.exe'(PE)--only-keep-debug+ strip)-fdebug-types-section-g1btkeepsfunc () at file:line; drops locals, args and types. Opt-in for the fleet only.debug_infois 208 of IRShapeDebug's 336 MB at-gand 68.5 MB at-g1.Before / after (one build dir,
origin/master8a38400,fleet-build -- -k, all 94 exes)build/totalIRShapeDebug.exeIRCanvasStress.exeIrredenEngineTest.exeIrredenEngineTest.dir/objects.a*.a*.obj*.exe*.dll(37 per-exe copies each)_deps_deps/*/.git* I couldn't delete and re-fetch
_deps, so the after builds reused the baseline's full clones. The 578 MB of history is still counted in the measured_depsandbuild/figures above. The ~26 MB is the sum of freshgit clone --depth 1 --branch <ref>.gitdirs for the 13 shallow deps (enkiTS now has none; LuaJIT was already shallow). On a fresh dir,build/comes to roughly 24.0 GB (FULL) and 8.2 GB (LINES).Build time for the full tree was 23.5 min before, 23.3 min for FULL and 15.7 min for LINES.
Test plan
allbuild at master, then FULL and LINES builds with this branch, all in the same build dir. Before: one failure (the miniaudio libvorbis DLL). Both afters: exit 0, no failures.compile_commands.jsonunder LINES shows-g … -g1, so the later flag wins.CMakeCachegetsIRREDEN_DEBUG_INFO:STRING=FULLwith no env set.link.txtshowsar.exe qcTfor the test exe'sobjects.a,libIrredenEngined.aand the enkiTS subproject'slibenkiTSd.a.gdb -batch -ex "break IREngine::init" -ex run -ex bton the LINESIRShapeDebug.exe:#0 IREngine::init () at …/ir_engine.hpp:115,#1 main () at …/shape_debug/main.cpp:2050.IrredenEngineTest.exe(LINES, thin archives): 3424 passed, 18 skipped, 16 failed. The sameToolSpawnTest.*,LuaSpawnToolTest.*andFontMakerSource.*tests fail on the opus-architect pool's existing exe, built before this branch with full-gand regular archives (15 failures there). They are pre-existing on this host:CreateProcessW failed with error 193from child spawns.scripts/fleet/tests/test_fleet_up_pane_launch_env.sh: 13 passed, including the newIRREDEN_DEBUG_INFO=LINESasserts on the pool-1 and split panes.scripts/fleet/tests/test_fleet_up_gh_accounting.sh: 44 passed, 0 failed.Notes for reviewer
MINGW.GIT_SHALLOW, the URL fetch andEXCLUDE_FROM_ALLare platform-neutral CMake.fleet-up'sLINESexport also reaches the Linux and macOS fleet panes. There clang reads-g1as-gline-tables-only, which keeps lldb backtraces. TheBUILD.mdgdb section says how to go back toFULLfor a session that needs locals.IRREDEN_DEBUG_INFOon their nextfleet-up.fleet-pr-overlapreturnedVERDICT: overlapwith clean trial merges only, all ontest/CMakeLists.txt: editor: establish sculpt, hierarchy and save workflows #4868, editor: sculpt transformed parts in an isolated local canvas #4869, editor: replace generated recipe cells while preserving manual edits #4871, editor: protect named documents and transactional save checkpoints #4872, editor: frame selected volumes clear of visible authoring panels #4873, render: keep text input values and cursors within their fields #4875 and editor: preview assembly motion without changing authored poses #4876. This PR adds just oneGIT_SHALLOW TRUEline to the googletest declare there.IR_copyDLLandirreden_stage_runtime_dllscopy each dependency DLL next to every exe (37 copies oflibspdlogd.dlletc., ~1 GB under FULL). Hard links would remove that, but a running demo would then lock the_depsDLL during a relink.🤖 Generated with Claude Code