One reading of a compile-flag element, the databases list what the compiler receives (#655); macOS 27 - #657
Merged
Merged
Conversation
…mpiler receives (#655) An element of `cflags`, `cxxflags` and `asmflags` now has one meaning on every host: the POSIX shell's word syntax without expansions, where a backslash escapes only a blank, a quote or a backslash (mcpp.manifest.flag_words, SPEC-004 §8). The ninja writer quotes each word for its host, and compile_commands.json and `mcpp emit build-database` list the words, so the databases equal the build by construction instead of re-reading command lines. Before, an element meant whatever the host's command-line reader made of it (measured on Linux and Windows runners, #656: five of fourteen spellings gave different macros), and the databases listed the text with a third reading, which is how libarchive's `-DPLATFORM_CONFIG_H=\"...\"` reached consumers with its backslashes. - A `defines` entry is one value: `N="x"` reaches the compiler as `-DN="x"` (it arrived as `-DN=x`). Features, globs, targets and `mcpp:cfg=` alike. - Link units keep their rendered text; GAS units' database entries list their edge's list; the `-std` guard, dialect promotion and include normalisation read words. - Windows `shell_quote_arg` doubles backslashes before a quote and the closing quote. - The first plan after an upgrade names an element whose words changed (`build/flag-words`); a repeated plan says nothing. No flag-list element of the published index changes. Tests: FlagWords.* (syntax table and round trip), CompileCommandsArgs.* (edge equals database, host quoting round trip, /bin/sh as the reference), e2e 736 (same assertions on every host; fails on 2026.9.16.2). Records: .agents/docs/2026-09-17-655-*. Version 2026.9.17.1.
GitHub serves macOS 27 under the preview label xcode-27 (macOS 27.0 with Xcode 27, actions/runner-images#14404); there is no macos-27 label. Measured on #658: the label delivers macOS 27.0 (26A5406e), arm64, ImageOS macos27. - ci-macos and ci-macos-e2e run on macos-15 and xcode-27. - ci-fresh-install runs the xlings and Homebrew channels on macos-14 (the floor) and xcode-27 (the newest release). - Every macOS 27 leg asserts sw_vers major 27, because the label names an Xcode and its base OS has changed once. - setup-macos-llvm takes the image as an input and puts it in the xlings cache key, which named macos15 for every image.
This was referenced Sep 16, 2026
…ed test fixes macOS 27 (measured on the xcode-27 image, #659): the 27.0 SDK's math.h leaves INFINITY and NAN to <float.h> once modules are on, and clang 22's header does not supply them under -std=c++23, so libc++'s std module stopped building. apple_float_macro_words (hostflags.cppm) states both with the SDK's own GNU-mode spellings for clang on an Apple target; its readers quote the words their own way (ninja text, the std module command, graph std flags, build program argv). gnu++23, -U__STRICT_ANSI__ and -D__need_infinity_nan were rejected for their effect beyond the defect. The raw clang steps of ci-macos state the same words. Compatibility: an element beginning with -D or /D that contains a space is one word, verbatim, as every release since #234 passed it (SPEC-004 §8 rule 8). Windows: flag_element no longer quotes a backslash the syntax does not read as an escape, normalize_include_flags keeps the spelling of an unchanged element, and the split_flags quoting tests follow the host's reader.
The raw clang steps now build import std on macOS 27 (run 35142520288). The self-host step failed because the bootstrap, 2026.9.16.1, predates the fix. setup-macos-llvm wraps a bootstrap older than 2026.9.17.1 on macOS 27 or later and passes the same two words through CCC_OVERRIDE_OPTIONS; the freshly built binary runs unwrapped, and the wrapper retires with the bootstrap pin.
…the 252 claim; index reading with the -D exception - report_flag_words_changes was inserted between fold_build_defines_into_flags and its comment; it now precedes the comment. - The record claimed e2e 252 keeps its real old-client leg on macOS through the wrapper. It does not, on any macOS leg including main: MCPP_BOOT is the xlings shim. Corrected and listed as a residual, with dialect promotion reading words. - The index reading script applies the -D exception: 285 literals, 0 differ.
Sunrisepeak
pushed a commit
that referenced
this pull request
Sep 16, 2026
The implementation plan and the triage record move to landed. The ledger closes every row with its reading: #657 merged as f1043b7, release 2026.9.17.1 mirrored byte for byte to GitHub and GitCode, index #854 published, the SubOS sandbox with CN mirrors at fails=0 against a control of fails=10, and the post-release fresh install on macOS 27 running mcpp new and run and building mcpp from source.
Sunrisepeak
added a commit
that referenced
this pull request
Sep 16, 2026
* bootstrap from 2026.9.17.1 2026.9.17.1 is released, mirrored to GitHub and GitCode (each archive compared byte for byte), and indexed (openxlings/xim-pkgindex#854). The macOS 27 bootstrap wrapper in setup-macos-llvm retires with this pin. * #655 landed: the ledger, the sandbox table, and the closure The implementation plan and the triage record move to landed. The ledger closes every row with its reading: #657 merged as f1043b7, release 2026.9.17.1 mirrored byte for byte to GitHub and GitCode, index #854 published, the SubOS sandbox with CN mirrors at fails=0 against a control of fails=10, and the post-release fresh install on macOS 27 running mcpp new and run and building mcpp from source. --------- Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
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.
Closes #655.
Summary
An element of
cflags,cxxflagsandasmflagsnow stands for the same compiler arguments on every host, the build quotes each word for its host, andcompile_commands.jsonandmcpp emit build-databaselist those words, so the databases equal the build by construction (mcpp.manifest.flag_words, SPEC-004 §8). The same pull request adds macOS 27 CI and fixes what it found:import stddid not build on macOS 27.#655
-Dor/Dand contains a space is one word, verbatim, as every release since [bug] defines 值含空格时未转义,命令行被拆散(-DX="long long" → 孤立 long 参数) #234 passed it.defines = ["N=\"x\""]reached the compiler as-DN=x; it now arrives as-DN="x".build/flag-words); a repeated plan says nothing. 285 flag-like literals of the published index read the same under the old and the new rules.shell_quote_argdoubles backslashes before a quote and the closing quote.macOS 27
xcode-27(nomacos-27label; [DO NOT MERGE] probe macOS 27 runner labels #658 read macOS 27.0 26A5406e).ci-macosandci-macos-e2erun onmacos-15andxcode-27;ci-fresh-installruns the xlings and Homebrew channels onmacos-14andxcode-27; each macOS 27 leg assertssw_versmajor 27.math.hleavesINFINITYandNANto<float.h>once modules are on, and clang's<float.h>does not supply them under-std=c++23, so libc++'s std module failed (use of undeclared identifier 'INFINITY', llvm 22.1.8 and 20.1.7; measured on the runner, [DO NOT MERGE] probe libc++ std module on macOS 27 #659). The released 2026.9.16.2 fails the same way on the fresh-install macOS 27 legs.-Wall -Werror. The decision reads the target triple only. Rejected:gnu++23(dialect of every unit),-U__STRICT_ANSI__(non-standard libc declarations),-D__need_infinity_nan(a singlefloat.hinclude losesFLT_MAX).CCC_OVERRIDE_OPTIONS; the binary the job builds runs unwrapped, and the wrapper retires with the bootstrap pin.Tests
FlagWords.*: syntax table with the-Dexception, round trip over 2000 generated words.CompileCommandsArgs.*: edge equals database; host quoting round trip on each CI host;/bin/shas the reference on POSIX.HostFlags.AppleFloatMacrosAreStatedForClangOnAppleTargetsOnly.e90674fb: 12 of 12 runs green, macOS 27 unit 121/121 and e2e 182 passed 0 failed.Records:
.agents/docs/2026-09-17-655-*. Version 2026.9.17.1.