You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(toolchain): backend abstraction (CommandDialect) + MinGW-w64 via the xlings ecosystem — 0.0.89 (#211)
* refactor(toolchain): CommandDialect + backend surface normalization (Part A)
New mcpp.toolchain.dialect: command-line *spellings* (gnu vs msvc) as a
value-type traits table — flags.cppm and ninja rule templates now spell
-I/-D/-std=/-c/-o/-O/-g/ar-invocations through it instead of hardcoding
GNU syntax. BmiTraits gains the module-flag spellings (compileModulesFlag,
stdBmiUsePrefix, moduleOutputPrefix, bmiSearchPrefix), replacing the
is_clang()/stdlib_id branches in flags.cppm. ProviderCapabilities gains
has_builtin_p1689_scan (drops ninja_backend's is_gcc gate). Toolchain gains
envOverrides (EnvVar list — std::pair member trips GCC-16 module pendings)
merged into ninja's child env; the MSVC backend will carry INCLUDE/LIB/PATH
through it. gcc::std_module_build_commands normalizes the provider surface
to the command-sequence shape clang already has. resolve_link_model returns
the empty PE model explicitly on Windows.
Zero-diff verified: build.ninja byte-identical (modulo the mcpp self-path
var) for GCC and LLVM toolchains on a multi-module import-std project;
mcpp test 31/31.
* feat(toolchain): MinGW-w64 GCC via the xlings ecosystem (mingw@16.1.0) (0.0.89)
User-facing 'mingw' spec → xim:mingw-gcc (winlibs GCC 16.1.0 + MinGW-w64
14.0.0 UCRT standalone build, mirrored at xlings-res/mingw-gcc). Reuses the
GCC backend end-to-end (gcm module pipeline, bits/std.cc import std);
Windows adds static libstdc++/libgcc defaults so produced exes run
standalone, and -static under linkage="static". archive_tool resolves the
bundled ar.exe; std.cc lookup gains a version-dir scan fallback.
Fixes ridden along: toolchain list 'Available' + partial-version resolution
read xpkg versions for the HOST platform (was hardcoded linux — empty on
win/mac); toolchain install no longer pulls glibc/linux-headers on win/mac.
e2e 97 (requires: windows cap) + ci-windows MinGW step + unit tests
(dialect rows, mingw spec mapping); docs + CHANGELOG; version 0.0.89.
* fix(linkmodel): key the PE early-out on the target, not the host
The Windows-host if-constexpr broke the linkmodel contract tests on
Windows CI (they resolve synthetic Linux-shaped toolchains anywhere).
Target-keyed is also the semantics a future cross build needs.
* fix(flags): MinGW links libstdc++exp for std::print terminal symbols
std::vprint_unicode's __open_terminal/__write_to_terminal live in
libstdc++exp.a on Windows-GCC targets — first real MinGW link on CI failed
with undefined references from bits/print.h.
* fix(flags): force winpthread static on MinGW links
winlibs POSIX-threads libstdc++ otherwise leaves produced exes depending on
libwinpthread-1.dll — the standalone-exe e2e caught it (empty output,
missing-DLL abort). -Wl,-Bstatic -lwinpthread -Wl,-Bdynamic is the standard
recipe; libwinpthread.a ships in the payload.
* test(e2e): 97 asserts the exe import table (objdump) + diagnostic output
The silent standalone-run failure gave nothing to debug — inspect DLL
imports directly and dump them on any failure.
* fix(flags): MinGW default links -static — the piecemeal winpthread recipe loses to driver implicit libs
CI import table still showed libwinpthread-1.dll after
-Wl,-Bstatic -lwinpthread; winlibs' documented answer for standalone exes
is a full -static link (system DLLs still resolve via import libs).
Gated on staticStdlib so [build] static_stdlib=false opts out.
0 commit comments