Commit 2a4a5ba
committed
test(toolchain): pin that full-static is a TARGET property, not a host one
Adds the regression assertions for a bug that exists on HEAD today: mcpp
decides whether to emit `-static` from `mcpp::platform::supports_full_static`,
a host constant defined as `is_linux`. On a Linux host that coincides with the
right answer for every Linux target, so nothing ever caught it — it only bites
once a non-Linux host cross-compiles to Linux, where `-static` silently
vanishes and the musl targets lose the very property they exist for.
`target_supports_full_static` takes the host capability as an explicit
parameter so the decision is pinnable from any host: passing false models a
Windows/macOS host. The implementation added here is a deliberate STUB
reproducing the old behaviour, so these tests go RED now and the next commit
turns them green — proving the assertions actually discriminate rather than
passing vacuously.
Verified red:
[ FAILED ] TargetSupportsFullStatic.LinuxTargetFromNonLinuxHost
[ FAILED ] TargetSupportsFullStatic.MacosTargetNeverStatic
[ FAILED ] TargetSupportsFullStatic.PeTargetsDeferToContractTable
3 FAILED TESTS
Refs .agents/docs/2026-08-03-windows-host-linux-cross-design.md §1.3 (B2)1 parent f694e13 commit 2a4a5ba
3 files changed
Lines changed: 617 additions & 0 deletions
File tree
- .agents/docs
- src/toolchain
- tests/unit
0 commit comments