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

Unified Diff: tools/gn/target.h

Issue 1207903002: Windows precompiled header support in GN (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Scott's grammar nits Created 5 years, 6 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/source_file_type.cc ('k') | tools/gn/target.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/target.h
diff --git a/tools/gn/target.h b/tools/gn/target.h
index 58319f121e596209e3c9084aecfe029eb999f8fb..e8758b7d7555fd04f66b56b49ece45a23945dfcc 100644
--- a/tools/gn/target.h
+++ b/tools/gn/target.h
@@ -10,6 +10,7 @@
#include <vector>
#include "base/basictypes.h"
+#include "base/gtest_prod_util.h"
#include "base/logging.h"
#include "base/strings/string_piece.h"
#include "base/synchronization/lock.h"
@@ -252,6 +253,8 @@ class Target : public Item {
}
private:
+ FRIEND_TEST_ALL_PREFIXES(Target, ResolvePrecompiledHeaders);
+
// Pulls necessary information from dependencies to this one when all
// dependencies have been resolved.
void PullDependentTarget(const Target* dep, bool is_public);
@@ -266,6 +269,10 @@ class Target : public Item {
// Fills the link and dependency output files when a target is resolved.
void FillOutputFiles();
+ // Checks precompiled headers from configs and makes sure the resulting
+ // values are in config_values_.
+ bool ResolvePrecompiledHeaders(Err* err);
+
// Validates the given thing when a target is resolved.
bool CheckVisibility(Err* err) const;
bool CheckTestonly(Err* err) const;
@@ -310,8 +317,13 @@ class Target : public Item {
// target is marked resolved. This will not include the current target.
std::set<const Target*> recursive_hard_deps_;
- ConfigValues config_values_; // Used for all binary targets.
- ActionValues action_values_; // Used for action[_foreach] targets.
+ // Used for all binary targets. The precompiled header values in this struct
+ // will be resolved to the ones to use for this target, if precompiled
+ // headers are used.
+ ConfigValues config_values_;
+
+ // Used for action[_foreach] targets.
+ ActionValues action_values_;
// Toolchain used by this target. Null until target is resolved.
const Toolchain* toolchain_;
« no previous file with comments | « tools/gn/source_file_type.cc ('k') | tools/gn/target.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698