-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathmcpp.toml
More file actions
132 lines (121 loc) · 5.71 KB
/
Copy pathmcpp.toml
File metadata and controls
132 lines (121 loc) · 5.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
[package]
name = "mcpp"
version = "2026.10.5.2"
description = "Modern C++ build & package management tool"
license = "Apache-2.0"
authors = ["mcpp-community"]
repo = "https://github.com/mcpp-community/mcpp"
[build]
# The global default profile is now "dev" (-O0 -g, mainstream convention);
# mcpp itself is a shipped tool, so opt its plain `mcpp build` (and release.yml's
# self-host build) back into the optimized profile. Without this the released
# binary would be -O0. A `--profile`/`--dev`/`--release` flag still overrides.
default-profile = "release"
# Split the module edge: importers start when the BMI is published rather than
# when the compiler exits. See docs/04-mcpp-toml.md.
#
# ON HERE, `auto` (= off) EVERYWHERE ELSE. The key stays opt-in until it has been
# through CI on every platform, and nothing was exercising it, so it could never
# accumulate the evidence needed to change that. mcpp's own build is where that
# evidence is cheapest: whatever this schedule produces has to pass 83 unit tests
# and the full e2e suite, on Linux (detach-codegen, gcc) and on macOS and Windows
# (two-phase, clang) — three platforms, every PR.
#
# THAT SAFETY NET IS NOT DECORATION — it has already caught one defect. The
# windows-host cross build to x86_64-linux-musl failed on the BMI edge with
#
# failed: gcm.cache/mcpp.libs.json.gcm
# modules/libs/src/json.cppm:3: fatal error: json.hpp: No such file or
# directory (the unit was src/libs/json.cppm when this was diagnosed)
#
# because `cmd.exe /c` does not use CreateProcess argument quoting, so the
# compiler ran with `-I` missing. Fixed in detach_codegen.cppm; see #425.
#
# Revert is this one line if anything here is ever unexplained.
bmi_schedule = "on"
# mcpp.exe declares the UTF-8 code page (mcpp#693); see docs/res/mcpp.rc. Only a PE
# target compiles a resource script, so this changes nothing elsewhere.
[resources]
files = ["docs/res/mcpp.rc"]
# The unit tests run in the code page mcpp.exe runs in, so a result does not
# depend on the region setting of the machine that runs them (2026.10.5.2). An
# engine older than the key reports it as unsupported and ignores it.
[test]
windows_code_page = "utf-8"
[toolchain]
default = "gcc@16.1.0"
macos = "llvm@22.1.8"
windows = "llvm@20.1.7"
# Per-target overrides: `mcpp build --target x86_64-linux-musl` (or the
# four-segment form `x86_64-unknown-linux-musl`) picks musl-gcc 16.1 + full
# static linkage. Used by .github/workflows/release.yml to produce a
# portable static binary that drops in anywhere with no ELF interp / RUNPATH
# baggage.
[target.x86_64-linux-musl]
toolchain = "gcc@16.1.0-musl"
linkage = "static"
# aarch64 (ARM64) static target. No explicit toolchain: the target table pins
# gcc@16.1.0 for this row, and mcpp's host-aware convention picks the payload —
# on an aarch64 host a NATIVE build (xim:musl-gcc), on an x86_64 host a CROSS
# build (xim:aarch64-linux-musl-gcc 16.1.0; measured for #694, which found this
# comment still naming 15.1.0). linkage=static is also implied by the -musl
# suffix; kept explicit for clarity. See
# .agents/docs/2026-06-22-aarch64-android-mvp-design.md.
[target.aarch64-linux-musl]
linkage = "static"
# Eat our own dog food: mcpp uses mcpplibs.cmdline for argument parsing.
# TOML-native namespaced form: `mcpplibs.cmdline` is the dotted subtable
# `[dependencies.mcpplibs] cmdline = "0.0.1"` ⇒ identity (mcpplibs, cmdline).
# The bootstrap mcpp used by the self-host build (xlings install mcpp, well
# past 0.0.6) understands this, so the legacy quoted form is no longer needed.
[dependencies]
mcpplibs.cmdline = "0.0.1"
# `modules/` holds what gets linked into this binary; `src/` is what has not
# been separated yet, and shrinking it is the direction. Each entry is an
# independent package with its own manifest, so the thing that used to be a
# directory convention is now a boundary the build enforces: a module under
# `modules/` cannot quietly reach back into the engine, because a package
# cannot depend on its consumer.
#
# A dependency KEY must match the package's identity, and these carry the
# `mcpp` namespace rather than squatting bare `json` / `toml` — dependency
# names resolve in one flat space, so `json = { path = … }` would take a name
# the registry may one day want.
#
# `[workspace] members` below is what makes `-p` and `mcpp test` address them;
# it is NOT what makes them importable. That is these path dependencies, and
# needing both is easy to get wrong because either one alone looks sufficient.
[dependencies.mcpp]
libs = { path = "modules/libs" }
log = { path = "modules/log" }
versioning = { path = "modules/versioning" }
source-kind = { path = "modules/source-kind" }
graph = { path = "modules/graph" }
dyndep = { path = "modules/dyndep" }
platform = { path = "modules/platform" }
manifest = { path = "modules/manifest" }
toolchain-model = { path = "modules/toolchain-model" }
buildmcpp = { path = "modules/buildmcpp" }
[workspace]
members = [
"modules/libs",
"modules/log",
"modules/versioning",
"modules/source-kind",
"modules/graph",
"modules/dyndep",
"modules/platform",
"modules/manifest",
"modules/toolchain-model",
"modules/buildmcpp",
]
# `mcpp build` ignores [dev-dependencies]; only `mcpp test` resolves them.
# Namespace omission means exactly mcpplibs, so the compat wrapper is explicit.
[dev-dependencies.compat]
gtest = "1.15.2"
# Everything else uses M5.0 conventions:
# - sources = src/**/*.{cppm,cpp,cc,c} (default glob picks up
# the 21 .cppm modules + src/main.cpp)
# - target = mcpp (kind=bin inferred from src/main.cpp)
# - standard = c++23
# - static_stdlib = true (default; portable binary)