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

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: unit test Created 6 years, 8 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
« no previous file with comments | « tools/gn/command_check.cc ('k') | tools/gn/commands.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « tools/gn/command_check.cc ('k') | tools/gn/commands.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698