Skip to content

Commit a65a52c

Browse files
committed
prepare.cppm: un-anonymize the preamble helpers ahead of the file split
The preamble's internal helpers (warn_unknown_xpkg_keys through with_index_cause, and the ToolPurpose enum among them) sat in an anonymous namespace, giving them TU-local (internal) linkage. That was fine while every phase using them lived in the same file; once the phases move to their own implementation units, an internal-linkage name is invisible outside the file that declares it (anonymous- namespace scoping is per translation unit, modules or not). Dropped the wrapper: these are now plain module-linkage declarations in prepare.cppm, which -- like pending_flag_words_notes(), already declared that way -- every implementation unit of the module can see without needing to be exported. No behaviour change: nothing outside the module could name these either way. Golden fixture diff against the baseline is empty; mcpp test: 129/129.
1 parent 827ddf9 commit a65a52c

1 file changed

Lines changed: 0 additions & 2 deletions

File tree

‎src/build/prepare.cppm‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1526,7 +1526,6 @@ std::string git_cache_head(const std::filesystem::path& gitRoot) {
15261526
// extraTargets: additional Target entries (e.g. synthetic test targets)
15271527
// appended to the manifest before the modgraph runs.
15281528
// overrides: --target / --static.
1529-
namespace {
15301529
// A dependency that "cannot be found" while an index is unreadable is almost
15311530
// never missing — it is unreachable, and the two need different actions from
15321531
// the user (publish it vs upgrade mcpp). The floor error is printed when the
@@ -2334,7 +2333,6 @@ std::string with_index_cause(std::string msg) {
23342333
msg += "\n" + hint;
23352334
return msg;
23362335
}
2337-
} // namespace
23382336

23392337
// The toolchain a host tool's package chose for itself, read the way its own
23402338
// build reads it (#710): the package's manifest with the root-position keys of

0 commit comments

Comments
 (0)