Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(42)

Unified Diff: tools/gn/command_gen.cc

Issue 216903004: Add optional public header checking to GN build (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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;

Powered by Google App Engine
This is Rietveld 408576698