Reproduction
On mcpp 2026.10.5.3, create a workspace with one executable member. Put an architecture-specific dialect flag in the member manifest:
# root/mcpp.toml
[workspace]
members = ["app"]
# root/app/mcpp.toml
[package]
name = "app"
version = "0.1.0"
standard = "c++23"
[build]
sources = ["main.cpp"]
[targets.app]
kind = "bin"
main = "main.cpp"
[target.i686-windows-msvc.build]
dialect_cxxflags = ["-D__cpp_impl_coroutine=201902L"]
With Clang 23.1.3 and the MSVC 14.44 STL, run mcpp build -p app --target i686-windows-msvc. The std precompile command omits the macro and fails in <generator> with missing suspend_always and coroutine_handle. The same conditional dialect mechanism works in a standalone package. A platform-independent reproduction can use a matching platform selector and inspect a harmless -D flag in the std-module cache record and generated compiler commands.
Expected behavior
A selected workspace member's matching conditional dialect flags reach the graph configuration, std/std.compat precompilation, scanning and all C++ translation units. A nonmatching architecture contributes nothing. Members with different conditional graph configurations must not be grouped into a plan that silently takes only the first member's flags. Ordinary dependency dialect flags remain ignored.
Actual behavior and source analysis
select_workspace_members creates virtual_workspace_root before conditional configuration is evaluated. The virtual root copies only first.buildConfig.dialectCxxflags, dropping first.conditionalConfigs. Later conditional merging of the member cannot update the graph-wide root used for std precompilation. root_position_key also ignores conditional dialect declarations when grouping workspace members.
Starting the command inside the member does not bypass the issue: that entry point also uses workspace member selection.
Environment
- mcpp 2026.10.5.3
- Windows x64 host, i686-windows-msvc target
- LLVM 23.1.3
- MSVC 14.44.35207 / Windows SDK 10.0.26100.0
This is a workspace regression at the intersection of conditional dialect support (#717) and virtual workspace plans. It does not require changing the public manifest syntax or target-table inheritance policy.
Reproduction
On mcpp 2026.10.5.3, create a workspace with one executable member. Put an architecture-specific dialect flag in the member manifest:
With Clang 23.1.3 and the MSVC 14.44 STL, run
mcpp build -p app --target i686-windows-msvc. The std precompile command omits the macro and fails in<generator>with missingsuspend_alwaysandcoroutine_handle. The same conditional dialect mechanism works in a standalone package. A platform-independent reproduction can use a matching platform selector and inspect a harmless-Dflag in the std-module cache record and generated compiler commands.Expected behavior
A selected workspace member's matching conditional dialect flags reach the graph configuration, std/std.compat precompilation, scanning and all C++ translation units. A nonmatching architecture contributes nothing. Members with different conditional graph configurations must not be grouped into a plan that silently takes only the first member's flags. Ordinary dependency dialect flags remain ignored.
Actual behavior and source analysis
select_workspace_memberscreatesvirtual_workspace_rootbefore conditional configuration is evaluated. The virtual root copies onlyfirst.buildConfig.dialectCxxflags, droppingfirst.conditionalConfigs. Later conditional merging of the member cannot update the graph-wide root used for std precompilation.root_position_keyalso ignores conditional dialect declarations when grouping workspace members.Starting the command inside the member does not bypass the issue: that entry point also uses workspace member selection.
Environment
This is a workspace regression at the intersection of conditional dialect support (#717) and virtual workspace plans. It does not require changing the public manifest syntax or target-table inheritance policy.