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

Unified Diff: trunk/src/tools/gn/settings.h

Issue 46313006: Revert 232657 "GN: toolchain threading cleanup" (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 1 month 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 | « trunk/src/tools/gn/scope_per_file_provider_unittest.cc ('k') | trunk/src/tools/gn/settings.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/tools/gn/settings.h
===================================================================
--- trunk/src/tools/gn/settings.h (revision 232660)
+++ trunk/src/tools/gn/settings.h (working copy)
@@ -38,18 +38,19 @@
// toolchain's outputs. It should have no slashes in it. The default
// toolchain should use an empty string.
Settings(const BuildSettings* build_settings,
+ const Toolchain* toolchain,
const std::string& output_subdir_name);
~Settings();
const BuildSettings* build_settings() const { return build_settings_; }
- const Label& toolchain_label() const { return toolchain_label_; }
- void set_toolchain_label(const Label& l) { toolchain_label_ = l; }
+ // Danger: this must only be used for getting the toolchain label until the
+ // toolchain has been resolved. Otherwise, it will be modified on an
+ // arbitrary thread when the toolchain invocation is found. Generally, you
+ // will only read this from the target generation where we know everything
+ // has been resolved and won't change.
+ const Toolchain* toolchain() const { return toolchain_; }
- // Indicates if this corresponds to the default toolchain.
- bool is_default() const { return is_default_; }
- void set_is_default(bool id) { is_default_ = id; }
-
bool IsMac() const { return target_os_ == MAC; }
bool IsLinux() const { return target_os_ == LINUX; }
bool IsWin() const { return target_os_ == WIN; }
@@ -93,8 +94,7 @@
private:
const BuildSettings* build_settings_;
- Label toolchain_label_;
- bool is_default_;
+ const Toolchain* toolchain_;
TargetOS target_os_;
« no previous file with comments | « trunk/src/tools/gn/scope_per_file_provider_unittest.cc ('k') | trunk/src/tools/gn/settings.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698