docs: the three Windows toolchain axes — a design, and two corrections - #446
Closed
Sunrisepeak wants to merge 1 commit into
Closed
docs: the three Windows toolchain axes — a design, and two corrections#446Sunrisepeak wants to merge 1 commit into
Sunrisepeak wants to merge 1 commit into
Conversation
The architecture review found where the problems are. This is what to do
about them, written after a round of questions that overturned two shapes in
my own proposal.
Both corrections are recorded in §0.2, because the wrong version looked
equally reasonable and will otherwise be proposed again:
- generalising `@system` to gcc/llvm is backwards. xlings is a user-space
OS and mcpp minimises host dependence; `msvc@system` is a Windows
concession, not a capability three families are missing.
- a `windows_sdk = "..."` manifest key should not exist. The model already
reserves the slot (`runtime_binding.cppm:26` documents `ucrt@...` and
nothing populates it), and a version key would sit next to `_WIN32_WINNT`
looking interchangeable while controlling a different thing — which is
worse than not having it.
The design separates three axes that are currently entangled: where the
compiler came from, which SDK is used, and what the artifact ships. They take
values independently — a managed toolset with the machine's SDK is what
xrgui's CI does today — so any design that fuses them into one switch is
wrong.
It also records the finding that makes `mcpp pack` more than a missing
feature: `ldd_parse` computes the dependency closure by RUNNING the binary
(LD_TRACE_LOADED_OBJECTS), so it cannot cross an OS or an architecture by
construction. Reading imports statically is what makes cross-packaging fall
out rather than be added.
The acceptance criteria are written so that none of them can be met by CI
going green — two of them explicitly require a machine POORER than the CI
runner, because "the verification environment is richer than the target" is
the shape that produced most of this round's eleven defect layers.
Member
Author
|
Superseded by #448, which carries this design and its implementation in one PR (§1/§2/§3/§4; §2.4 deliberately not done). The doc commit is unchanged in #448, with an added §6.5 recording what each item actually became — including the two places the plan was corrected by the implementation, and the one half of §4 that was deliberately left undone with its cost stated. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The architecture review found where the problems are. This is what to do about them — written after a round of questions that overturned two shapes in my own proposal.
Two corrections, recorded up front (§0.2)
Both are in the doc because the wrong version looked equally reasonable and will otherwise be proposed again:
@systemto gcc/llvm is backwards. xlings is a user-space OS and mcpp minimises host dependence —msvc@systemis a Windows concession, not a capability three families are missing. (Also noted: the one place host dependence genuinely is offered is spelled with no family at all.)windows_sdk = "..."manifest key should not exist. The model already reserves the slot —runtime_binding.cppm:26documentsucrt@...and nothing populates it — and a version key would sit next to_WIN32_WINNTlooking interchangeable while controlling a different thing. That is worse than not having it.The three axes
Currently entangled; they take values independently — a managed toolset with the machine's SDK is what xrgui's CI does today — so any design fusing them into one switch is wrong.
vcruntime140.dllAnd the resulting layering:
The
ucrt@<ver>identity is deliberately not the same asglibc@<ver>: glibc binds a payload the artifact really runs against;ucrtbase.dlllives in the OS and must not be shipped. That difference goes in the code comment, or someone will try to bundle it.mcpp packis deeper than a missing featureldd_parsecomputes the dependency closure by running the binary (LD_TRACE_LOADED_OBJECTS). So it cannot cross an OS or an architecture by construction — the#if defined(_WIN32)refusal is a symptom, not the cause. Reading imports statically is what makes cross-packaging fall out rather than be added.Also:
packnever reads the Contract, socxx_runtimehas no enforcer at packaging time on either platform.Acceptance criteria none of which CI can satisfy
This round had eleven defect layers and every one of them was green in CI when it shipped. So the criteria are written against that:
WindowsSdkDirsomewhere else and the build still uses the payload's SDK — if the environment can override it, it was never bound/MDartifact runs on a clean Windows box with no VS and no redist — explicitly a machine poorer than the CI runnerTwo of them require a poorer environment than CI on purpose: "the verification environment is richer than the target" is the shape that produced most of this round's defects.
What is deliberately not done
§2.4 — the manifest SDK version key. Reasons in that section, including how Windows developers actually handle the SDK today and why the default (follow the toolset's dependency) already beats the mainstream practice.