-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathmcpp.toml
More file actions
117 lines (108 loc) · 5.11 KB
/
Copy pathmcpp.toml
File metadata and controls
117 lines (108 loc) · 5.11 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
[package]
name = "mcpp"
version = "2026.8.29.1"
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/05-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"
[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: mcpp's host-aware
# convention picks it — on an aarch64 host this is a NATIVE build (xim:musl-gcc),
# on an x86_64 host a CROSS build (xim:aarch64-linux-musl-gcc, gcc 15.1.0 from
# musl-cross-make). 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" }
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/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)