summaryrefslogtreecommitdiffstats
path: root/tools/gn/ninja_target_writer.h
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-11-04 19:19:59 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-11-04 19:19:59 +0000
commit132715e1e82b1f69fc5a67d3acedb24c12d02e2a (patch)
treed439dd489e8f11e40e9161c5e45188f62ff2d1e6 /tools/gn/ninja_target_writer.h
parent21bb906f7ce89a54bf8ecdb951771bb25069e43c (diff)
downloadchromium_src-132715e1e82b1f69fc5a67d3acedb24c12d02e2a.zip
chromium_src-132715e1e82b1f69fc5a67d3acedb24c12d02e2a.tar.gz
chromium_src-132715e1e82b1f69fc5a67d3acedb24c12d02e2a.tar.bz2
GN: toolchain threading cleanup
Remove the thread-unsafe toolchain pointer on the otherwise-threadsafe Settings object. I replaced it with the toolchain label, and moved the is_default flag from the toolchain to the Settings object. This required that I pass the toolchain around in a few more places, but also simplifies some other cases. I removed the toolchain prefix from Ninja rules for the default toolchain since that's not necessary any more for GYP compat. This fixes an annoying double-free in the toolchain manager. I think my current refactor will clean this up in a later phase. R=scottmg@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=232657 Review URL: https://codereview.chromium.org/51693002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@232755 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools/gn/ninja_target_writer.h')
-rw-r--r--tools/gn/ninja_target_writer.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/gn/ninja_target_writer.h b/tools/gn/ninja_target_writer.h
index c9c72a7..e1c3bf8 100644
--- a/tools/gn/ninja_target_writer.h
+++ b/tools/gn/ninja_target_writer.h
@@ -19,7 +19,9 @@ class Target;
// generated by the NinjaBuildWriter.
class NinjaTargetWriter {
public:
- NinjaTargetWriter(const Target* target, std::ostream& out);
+ NinjaTargetWriter(const Target* target,
+ const Toolchain* toolchain,
+ std::ostream& out);
virtual ~NinjaTargetWriter();
static void RunAndWriteFile(const Target* target);
@@ -27,9 +29,6 @@ class NinjaTargetWriter {
virtual void Run() = 0;
protected:
- // Returns the toolchain associated with the target.
- const Toolchain* GetToolchain() const;
-
// Returns the string to be appended to source rules that encodes the
// order-only dependencies for the current target. This will include the
// "|" character so can just be appended to the source rules. If there are no
@@ -41,6 +40,7 @@ class NinjaTargetWriter {
const Settings* settings_; // Non-owning.
const Target* target_; // Non-owning.
+ const Toolchain* toolchain_; // Non-owning.
std::ostream& out_;
PathOutput path_output_;