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

Unified Diff: tools/gn/args.h

Issue 137713007: Check for GN args using the union of all rather than individually. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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 | « no previous file | tools/gn/args.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/args.h
diff --git a/tools/gn/args.h b/tools/gn/args.h
index 78a3473a30cc3eb9d83c17e9ae77306c8854da37..6852c30930076f5346d021f431cec179e4fd2a4b 100644
--- a/tools/gn/args.h
+++ b/tools/gn/args.h
@@ -35,6 +35,9 @@ class Args {
// argument is set.
const Value* GetArgOverride(const char* name) const;
+ // Gets all overrides set on the build.
+ Scope::KeyValueMap GetAllOverrides() const;
+
// Sets up the root scope for a toolchain. This applies the default system
// flags, then any overrides stored in this object, then applies any
// toolchain overrides specified in the argument.
@@ -58,11 +61,17 @@ class Args {
// arguments. If there are, this returns false and sets the error.
bool VerifyAllOverridesUsed(Err* err) const;
- // This function is not threadsafe, it must only be used when
- // single-threaded. It's used to implement the "args" command.
- const Scope::KeyValueMap& declared_arguments() const {
- return declared_arguments_;
- }
+ // Like VerifyAllOverridesUsed but takes the lists of overrides specified and
+ // parameters declared.
+ static bool VerifyAllOverridesUsed(
+ const Scope::KeyValueMap& overrides,
+ const Scope::KeyValueMap& declared_arguments,
+ Err* err);
+
+ // Adds all declared arguments to the given output list. If the values exist
+ // in the list already, their values will be overwriten, but other values
+ // already in the list will remain.
+ void MergeDeclaredArguments(Scope::KeyValueMap* dest) const;
private:
// Sets the default config based on the current system.
« no previous file with comments | « no previous file | tools/gn/args.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698