Skip to content

Commit 2786463

Browse files
committed
the Apple list has one definition and three spellings
`os == "macos" || os == "ios"` is `Triple::is_apple()`. This module takes `os` as a string rather than a `Triple` deliberately — it is pure, and importing the toolchain model to reach one predicate would couple what that choice decoupled — so the spelling stays and the comment names where the canonical list lives and which other sites carry a copy.
1 parent 2e288b5 commit 2786463

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

src/toolchain/cenv.cppm

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -600,6 +600,14 @@ inline std::expected<Realisation, std::string> realise(
600600
// this token lives in `openkal-cross.yml`, which compiles an
601601
// idiom-triggering unit for `aarch64-macos` over the openkal stack and
602602
// asserts the symbol is absent from the object.
603+
//
604+
// `os == "macos" || os == "ios"` IS `Triple::is_apple()`, SPELLED OUT.
605+
// This module takes `os` as a string rather than a `Triple` on purpose ---
606+
// it is pure, and importing `mcpp.toolchain-model` to reach one predicate
607+
// would couple what that choice decoupled. The canonical list is
608+
// `modules/toolchain-model/src/triple.cppm`; `ninja_backend.cppm` spells
609+
// it out twice for the same reason. A new Apple OS in the vocabulary has
610+
// to visit all three, and this comment is the grep target that says so.
603611
if (decl.builtins == mcpp::targetside::CAbiBuiltins::Iso) {
604612
if (!freestanding && (os == "macos" || os == "ios"))
605613
r.builtinsTokens.push_back("-fno-builtin");

0 commit comments

Comments
 (0)