Commit 8145abc
authored
feat(compat.openblas): Windows support (import-lib + runtime DLL) + Windows CI (#55)
* feat(compat.openblas): Windows support via prebuilt import-lib + runtime DLL
Adds Windows to compat.openblas. OpenBLAS has no upstream Make path for the
MSVC-ABI Clang mcpp links with, so Windows uses the prebuilt x64 zip: link the
MSVC import lib (lib/libopenblas.lib) and ship the runtime DLL
(bin/libopenblas.dll) beside the consumer's .exe. mcpp >= 0.0.73 stages a
dependency's [runtime] library_dirs *.dll next to the executable (PE has no
RPATH), so the consumer launches standalone.
Recipe:
* xpm.windows: OpenBLAS-0.3.33-x64.zip (GLOBAL OpenMathLib GitHub; CN gitcode
mcpp-res/openblas, uploaded + GET-verified byte-equal). Unpacks to
bin/ lib/ include/ (no wrapper dir).
* mcpp ldflags are now per-OS (the synthesized-manifest parser APPENDS
ldflags, so a global -lopenblas would wrongly reach the Windows link):
linux/macosx link the static -lopenblas; windows links -llibopenblas
(clang MSVC maps it to libopenblas.lib).
* mcpp.windows: [runtime] library_dirs=["bin"] (DLL deploy) + a
generated_files anchor TU (no Make build on Windows). install() returns
immediately on windows; linux/macosx keep the source build.
CI (Phase D): smoke_compat_portable.sh gains a Windows-only OpenBLAS
build-AND-run — cblas_dgemm must produce [19 22; 43 50], and the produced .exe
is launched DIRECTLY from a neutral CWD so a clean exit proves the DLL was
actually deployed beside it (not merely found via mcpp run's PATH prepend).
MCPP_VERSION pinned 0.0.68 -> 0.0.73 (the release carrying DLL deployment).
See mcpp .agents/docs/2026-06-29-windows-runtime-dll-deployment-and-openblas.md.
* fix(smoke): openblas Windows direct-launch uses absolute exe path
The Phase D direct-launch assertion ran the .exe found by `find target` (a
path relative to the project dir) after `cd /`, so it resolved to a
nonexistent path ("No such file or directory") and failed even though the
build linked the import lib, deployed bin/libopenblas.dll beside the .exe (the
DLL-presence check passed), and `mcpp run` succeeded. Absolutise the exe path
(exedir via pwd + basename) before the neutral-CWD launch.1 parent e1e3716 commit 8145abc
3 files changed
Lines changed: 118 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
15 | 17 | | |
16 | 18 | | |
17 | 19 | | |
| |||
238 | 240 | | |
239 | 241 | | |
240 | 242 | | |
241 | | - | |
242 | | - | |
| 243 | + | |
| 244 | + | |
243 | 245 | | |
244 | 246 | | |
245 | 247 | | |
246 | 248 | | |
247 | | - | |
248 | | - | |
| 249 | + | |
| 250 | + | |
249 | 251 | | |
250 | 252 | | |
251 | 253 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
22 | | - | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
23 | 33 | | |
24 | 34 | | |
25 | 35 | | |
| |||
50 | 60 | | |
51 | 61 | | |
52 | 62 | | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
53 | 75 | | |
54 | 76 | | |
55 | 77 | | |
56 | 78 | | |
57 | 79 | | |
58 | 80 | | |
59 | | - | |
60 | | - | |
61 | | - | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
62 | 86 | | |
63 | 87 | | |
64 | 88 | | |
65 | | - | |
66 | 89 | | |
67 | 90 | | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
68 | 114 | | |
69 | 115 | | |
70 | 116 | | |
| |||
155 | 201 | | |
156 | 202 | | |
157 | 203 | | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
158 | 210 | | |
159 | 211 | | |
160 | 212 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
414 | 414 | | |
415 | 415 | | |
416 | 416 | | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
417 | 470 | | |
0 commit comments