Motivation
[package].standard is parsed today, but C++ compile flags and import std BMI prebuilds still have C++23 hardcoded in key places. Users can currently work around C++26 by adding -std= in build.cxxflags, but that bypasses the intended manifest/fingerprint/std-module model and can leave cached std BMIs built with the wrong dialect.
Scope
- Treat the active C++ standard as a first-class build setting, defaulting to C++23.
- Support C++26 spellings such as
c++26 and c++2c, with room for GNU dialect aliases.
- Ensure build flags, fingerprinting, compile_commands, and std module BMI prebuilds consume the same active standard.
- Add metadata validation for cached std module BMIs so
import std cannot reuse a BMI built with a different C++ standard.
- Keep
build.cxxflags as additional C++ flags, not the language-standard configuration path.
- Update docs and regression coverage.
Design Notes
The design draft is tracked in .agents/docs/2026-06-01-cpp-standard-first-class-design.md.
Test Plan
- Unit tests for manifest standard parsing and aliases.
- Unit tests for generated build flags and std module build commands.
- E2E coverage for C++26 flags in build.ninja and compile_commands.
- Toolchain-gated import-std checks where supported by the CI environment.
Motivation
[package].standardis parsed today, but C++ compile flags andimport stdBMI prebuilds still have C++23 hardcoded in key places. Users can currently work around C++26 by adding-std=inbuild.cxxflags, but that bypasses the intended manifest/fingerprint/std-module model and can leave cached std BMIs built with the wrong dialect.Scope
c++26andc++2c, with room for GNU dialect aliases.import stdcannot reuse a BMI built with a different C++ standard.build.cxxflagsas additional C++ flags, not the language-standard configuration path.Design Notes
The design draft is tracked in
.agents/docs/2026-06-01-cpp-standard-first-class-design.md.Test Plan