feat(toolchain): cross-compile Windows targets with MinGW and run tests under Wine
VoidBuildSystem CI / build-and-test-gcc16 (push) Failing after 4s
VoidBuildSystem CI / signing-openssl-gcc16 (push) Failing after 9s

This commit is contained in:
faumaray committed 2026-12-05 04:47:18 +03:00
1 parent 70483492aa
commit a808596462
8 files changed
+157 -31

No files matched your search

+2
View File
@@ -284,6 +284,8 @@ Stage: VERIFIED — Plans 01–19 + Plan 20 Slices 1–2C + Track A + Track B (B
- **Wave 94 (CPack-Style Self-Extracting Installed & IDE Install Tasks)**: `vbs install --archive FILE --archive-format sh` now emits an executable POSIX self-extracting installer (tar payload + `--prefix`/`PREFIX` handling) in addition to the plain tar; the install test runs the generated script and verifies the extracted prefix. The generated VS Code and Zed tasks gained `vbs: install` and `vbs: package installer` entries (asserted in the IDE test).
- **Wave 96 (Wine-First Windows Target Support)**: `discover_and_probe` selects the MinGW-w64 cross toolchain (`x86_64-w64-mingw32-{g++,gcc,ar}`, or `aarch64` for arm64 targets) when the profile targets Windows from a non-Windows host; Windows targets emit PE artifacts (`<name>.exe`, `<name>.dll`); `vbs build|test` accept `--target-os`/`--target-arch`; `vbs test` runs cross-built Windows test binaries under Wine. Verified end to end: a Windows-target project cross-compiles and its test passes under Wine (`FullV1Tests.track_c_windows_target_cross_build_and_wine_test`, skipped when MinGW/Wine are absent).
## Remaining future scope
- **Superiority plan ([22-superiority-and-gaps.md](../roadmap/22-superiority-and-gaps.md), 2026-12-05)**: revised platform strategy - **macOS deferred**, **Windows via MinGW-w64 cross-compilation + Wine execution** (`dev cpp-gcc -p pkgsCross.mingwW64.stdenv.cc`, `dev cpp-gcc -p wine64`), native MSVC deferred; plus packaging parity (ZIP/DEB/RPM), IDE ecosystem, migration tooling, test-runner parity, benchmarks, CI runners, and remote execution in prioritized order.
+1
View File
@@ -99,4 +99,5 @@ Base HEAD: `fe0d1a6`
| Wave 93 (Self-contained installers) | `bundle_runtime_dependencies` + deterministic installer archive; `vbs install --bundle-dependencies --archive` | COMPLETE & VERIFIED (GCC 16.2, pin `0002e74`; install CLI test passes with archive extraction and byte-identical reruns, full CTest 8/8) | `include/Void/Build/Install/Installer.hpp`, `src/Install/Installer.cpp`, `src/Main.cpp`, `tests/FullV1Tests.cpp`, docs |
| Wave 94 (Installer script + IDE install tasks) | `--archive-format sh` self-extracting installer executed in tests; VS Code/Zed install tasks | COMPLETE & VERIFIED (GCC 16.2, pin `0002e74`; install and IDE tests pass, full CTest 8/8) | `include/Void/Build/Install/Installer.hpp`, `src/Install/Installer.cpp`, `src/Main.cpp`, `src/Editor/CompDb.cpp`, `tests/FullV1Tests.cpp`, docs |
| Wave 95 (Superiority plan) | Wrote `22-superiority-and-gaps.md`: gap inventory, revised platforms (macOS deferred; Windows via MinGW-w64 + Wine; native MSVC deferred), CMake/Meson/build2 parity table, differentiators, priority order, acceptance gates; refreshed stale roadmap statuses | PLAN WRITTEN (implementation pending) | `docs/roadmap/22-superiority-and-gaps.md`, `docs/roadmap/{README,20,21}.md`, `STATE.md` |
| Wave 96 (Wine-first Windows target) | MinGW-w64 cross discovery, PE artifact naming, `--target-os/--target-arch`, Wine test runner | COMPLETE & VERIFIED (GCC 16.2, pin `0002e74`; Windows target cross-build + Wine test pass; full CTest 8/8) | `src/Toolchain/Driver.cpp`, `src/Graph/Graph.cpp`, `src/Main.cpp`, `tests/FullV1Tests.cpp`, docs |
| Future (Plan 20 Slice 3 / Tracks C, E3 editor extensions) |"}] Live `conan` CLI verification; macOS/Windows/cross-compile; binary-variant signing and key distribution; daemon-side dependency materialization and editor plugins; `Void::Net`/`Void::Sqlite` alignment | PLANNED (unimplemented) | [21-expansion-roadmap.md](../roadmap/21-expansion-roadmap.md), [20-future-translation-platforms.md](../roadmap/20-future-translation-platforms.md) |
+18
View File
@@ -1351,6 +1351,24 @@ dev cpp-gcc -c build/pinned/bin/vbs_v1_tests --suite Daemon --no-color
`vbs: install`.
- Full CTest: **8 / 8 passed** in 277.74 s.
## Wine-First Windows Target Support (GCC 16.2, pin `0002e74`)
Available via `dev cpp-gcc -p pkgsCross.mingwW64.stdenv.cc -p wine64`: MinGW-w64 GCC 16.2
(`x86_64-w64-mingw32-*`) and Wine 11.0.
```sh
dev cpp-gcc -p pkgsCross.mingwW64.stdenv.cc -p wine64 -c build/pinned/bin/vbs test --project <proj> \
--build-dir <build> --target-os windows --target-arch x86_64 --jobs 4
dev cpp-gcc -p pkgsCross.mingwW64.stdenv.cc -p wine64 -c build/pinned/bin/vbs_v1_tests \
--filter track_c_windows_target_cross_build_and_wine_test --no-color
```
- Observed: 4 actions (2 compiles, 2 PE links), `winapp.exe`/`win_test.exe` produced, and
`vbs test: PASSED 'win_test'` through the Wine runner.
- Regression test `FullV1Tests.track_c_windows_target_cross_build_and_wine_test`: **passed**
(8.91 s); it skips when MinGW or Wine is absent.
- Full CTest: **8 / 8 passed** in 279.16 s.
## Limits and Unrun Checks
1. **HTTPS git fetch**: the host shell is proxy-restricted, but the Docker container could clone `https://git.faumaray.com/Void/VoidLibrary.git`; the pinned commit `3e254055e081a104f08df68dde39711bc7813518` was fetched directly for the verification above. A separate configure against the local `/home/faumaray/Projects/Library` checkout via `VBS_VOID_SOURCE_DIR` also succeeded (development-only override, checkout unmodified).
+2
View File
@@ -32,6 +32,8 @@ build2 documentation was **not** available through Context7; build2 statements b
- **Native MSVC / clang-cl host support is deferred** (Track C3-native) until a real Windows
host exists.
Status 2026-12-05: items 1-3 below are **implemented** (`--target-os windows --target-arch x86_64`, MinGW-w64 discovery, `.exe`/`.dll` naming, Wine test runner) and verified by `FullV1Tests.track_c_windows_target_cross_build_and_wine_test`; item 4 (path/case-sensitivity validation under Wine) remains.
Concrete work this implies:
1. Toolchain driver discovers `x86_64-w64-mingw32-{gcc,g++,ar,windres}` and records
`target_triple`, PE artifact naming (`.exe`, `.dll`, `.a`/`.lib`, import libraries).