Commit 12dc0c0
committed
fix: statically link the Windows standalone CLI release (SYS-W11-06)
Downloaded and verified the real published meshcraft-cli-windows
artifact from the first fully-green windows-2022 CI run, per
SYS-W11-06's amended acceptance criteria (extract outside any build
tree, run --version, reproduce the MC3->MCB/GLB fixture and check its
SHA-256). The artifact failed at the first step: mc3togltf.exe wouldn't
even start (STATUS_DLL_NOT_FOUND under a MinGW+Wine repro of the exact
downloaded files) -- the artifact bundles only the two .exe files, but
mc3togltf.exe dynamically links Manifold and tinyxml2 (both inherit
Manifold's own BUILD_SHARED_LIBS=ON default) plus the MinGW toolchain's
own runtime (libgcc_s_seh-1.dll/libwinpthread-1.dll/libstdc++-6.dll),
none of which the "Publish qualified Windows CLI artifacts" step
stages.
Rather than enumerating and uploading every DLL (fragile, and the
POST_BUILD $<TARGET_RUNTIME_DLLS:...> copy step doesn't even see the
raw MinGW compiler runtime DLLs, only proper CMake library targets),
fixed this the same way Mc3/Mcb/mc3togltf_lib already are: link
everything statically. Added -DBUILD_SHARED_LIBS=OFF and
-DCMAKE_EXE_LINKER_FLAGS="-static -static-libgcc -static-libstdc++" to
the standalone-windows job's shared configure step (all 4 components).
Also fixed a real CMake gotcha this surfaced: mc3togltf_stage_runtime_
dlls()'s POST_BUILD command failed outright once a target had zero
DLL dependencies -- $<TARGET_RUNTIME_DLLS:target> expands to nothing,
and `cmake -E copy_if_different` with no source arguments is an error,
not a no-op. Fixed with the documented $<IF:$<BOOL:...>,copy_if_different,true>
workaround.
Verified via a real MinGW+Wine repro of the exact static-linked
binaries: mc3togltf.exe and mc3tomcb.exe both now have zero DLL
dependencies, both run --version standalone, and both reproduce
test/house.mc3.xml's MC3->GLB/MCB conversion byte-identical to the
existing fixture SHA-256 hashes
(0ef25953c8bce.../4157f107e277a...). Also reran the full 28-test
standalone mc3 suite under this same static config: 28/28 pass (one
apparent timeout on a solo rerun was Wine process contention, not a
real failure, matching an already-known pattern from earlier tonight).1 parent 5f349d1 commit 12dc0c0
2 files changed
Lines changed: 29 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
105 | 117 | | |
106 | | - | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
107 | 121 | | |
108 | 122 | | |
109 | 123 | | |
| |||
119 | 133 | | |
120 | 134 | | |
121 | 135 | | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
128 | 141 | | |
129 | 142 | | |
130 | 143 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
114 | 121 | | |
115 | | - | |
| 122 | + | |
| 123 | + | |
116 | 124 | | |
117 | 125 | | |
118 | 126 | | |
| |||
0 commit comments