| Index: tools/gn/command_gen.cc
|
| diff --git a/tools/gn/command_gen.cc b/tools/gn/command_gen.cc
|
| index 139e0dca0f8d0f7e2e965f7ae661c91568ae8fa6..b8e5e0fbb81d731b8c48bc106c34704c2fe04b0f 100644
|
| --- a/tools/gn/command_gen.cc
|
| +++ b/tools/gn/command_gen.cc
|
| @@ -22,6 +22,8 @@ namespace {
|
| // Suppress output on success.
|
| const char kSwitchQuiet[] = "q";
|
|
|
| +const char kSwitchCheck[] = "check";
|
| +
|
| void BackgroundDoWrite(const Target* target,
|
| const Toolchain* toolchain,
|
| const std::vector<const Item*>& deps_for_visibility) {
|
| @@ -103,6 +105,9 @@ int RunGen(const std::vector<std::string>& args) {
|
| if (!setup->DoSetup(args[0]))
|
| return 1;
|
|
|
| + if (CommandLine::ForCurrentProcess()->HasSwitch(kSwitchCheck))
|
| + setup->set_check_public_headers(true);
|
| +
|
| // Cause the load to also generate the ninja files for each target. We wrap
|
| // the writing to maintain a counter.
|
| base::subtle::Atomic32 write_counter = 0;
|
|
|