| 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_;
|
|
|
|
|