Add a full.carbon min-prelude that pulls in the full production prelude (#5703)

The `full.carbon` prelude just sets a flag indicating an explicit intent
to include the full prelude. Once all tests include some prelude file,
an error can be enabled (currently it's commented out) that requires an
`INCLUDE-FILE` of some min-prelude to be present in all `check/` and
`lower/` file tests.
This commit is contained in:
Dana Jansens
2025-06-24 18:10:55 +00:00
committed by GitHub
parent b91ad3be36
commit badd544798
5 changed files with 96 additions and 51 deletions
+8 -7
View File
@@ -282,7 +282,7 @@ to be specified in the compile command line.
Excludes files with the given prefix from dumps.
)""",
},
[&](auto& arg_b) { arg_b.Set(&exclude_dump_file_prefix); });
[&](auto& arg_b) { arg_b.Append(&exclude_dump_file_prefixes); });
b.AddFlag(
{
.name = "debug-info",
@@ -508,12 +508,13 @@ class MultiUnitCache {
private:
auto BuildIncludeInDumps() -> void {
CARBON_CHECK(include_in_dumps_.empty());
llvm::append_range(include_in_dumps_,
llvm::map_range(units_, [&](const auto& unit) {
return options_->exclude_dump_file_prefix.empty() ||
!unit->input_filename().starts_with(
options_->exclude_dump_file_prefix);
}));
llvm::append_range(
include_in_dumps_, llvm::map_range(units_, [&](const auto& unit) {
return llvm::none_of(
options_->exclude_dump_file_prefixes, [&](auto prefix) {
return unit->input_filename().starts_with(prefix);
});
}));
}
auto BuildTreeAndSubtreesGetters() -> void {