Index: tools/gn/scope_per_file_provider.h |
diff --git a/tools/gn/scope_per_file_provider.h b/tools/gn/scope_per_file_provider.h |
index 1021c276133c80102bfda7e36e2245f12d1ef1bb..2ef84cc8493864bb0553fcd016de4f58a7d99371 100644 |
--- a/tools/gn/scope_per_file_provider.h |
+++ b/tools/gn/scope_per_file_provider.h |
@@ -14,7 +14,10 @@ |
// variable support. |
class ScopePerFileProvider : public Scope::ProgrammaticProvider { |
public: |
- ScopePerFileProvider(Scope* scope); |
+ // allow_target_vars allows the target-related variables to get resolved. |
+ // When allow_target_vars is unset, the target-related values will be |
+ // undefined to GN script. |
+ ScopePerFileProvider(Scope* scope, bool allow_target_vars); |
virtual ~ScopePerFileProvider(); |
// ProgrammaticProvider implementation. |
@@ -31,6 +34,8 @@ class ScopePerFileProvider : public Scope::ProgrammaticProvider { |
const Value* GetTargetGenDir(); |
const Value* GetTargetOutDir(); |
+ bool allow_target_vars_; |
+ |
// All values are lazily created. |
scoped_ptr<Value> current_toolchain_; |
scoped_ptr<Value> default_toolchain_; |