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

Side by Side Diff: tools/gn/toolchain.cc

Issue 51693002: GN: toolchain threading cleanup (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « tools/gn/toolchain.h ('k') | tools/gn/toolchain_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "tools/gn/toolchain.h" 5 #include "tools/gn/toolchain.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "tools/gn/value.h" 8 #include "tools/gn/value.h"
9 9
10 const char* Toolchain::kToolCc = "cc"; 10 const char* Toolchain::kToolCc = "cc";
11 const char* Toolchain::kToolCxx = "cxx"; 11 const char* Toolchain::kToolCxx = "cxx";
12 const char* Toolchain::kToolObjC = "objc"; 12 const char* Toolchain::kToolObjC = "objc";
13 const char* Toolchain::kToolObjCxx = "objcxx"; 13 const char* Toolchain::kToolObjCxx = "objcxx";
14 const char* Toolchain::kToolRc = "rc"; 14 const char* Toolchain::kToolRc = "rc";
15 const char* Toolchain::kToolAsm = "asm"; 15 const char* Toolchain::kToolAsm = "asm";
16 const char* Toolchain::kToolAlink = "alink"; 16 const char* Toolchain::kToolAlink = "alink";
17 const char* Toolchain::kToolSolink = "solink"; 17 const char* Toolchain::kToolSolink = "solink";
18 const char* Toolchain::kToolLink = "link"; 18 const char* Toolchain::kToolLink = "link";
19 const char* Toolchain::kToolStamp = "stamp"; 19 const char* Toolchain::kToolStamp = "stamp";
20 const char* Toolchain::kToolCopy = "copy"; 20 const char* Toolchain::kToolCopy = "copy";
21 21
22 Toolchain::Tool::Tool() { 22 Toolchain::Tool::Tool() {
23 } 23 }
24 24
25 Toolchain::Tool::~Tool() { 25 Toolchain::Tool::~Tool() {
26 } 26 }
27 27
28 Toolchain::Toolchain(const Label& label) : Item(label), is_default_(false) { 28 Toolchain::Toolchain(const Settings* settings, const Label& label)
29 : Item(settings, label) {
29 } 30 }
30 31
31 Toolchain::~Toolchain() { 32 Toolchain::~Toolchain() {
32 } 33 }
33 34
34 Toolchain* Toolchain::AsToolchain() { 35 Toolchain* Toolchain::AsToolchain() {
35 return this; 36 return this;
36 } 37 }
37 38
38 const Toolchain* Toolchain::AsToolchain() const { 39 const Toolchain* Toolchain::AsToolchain() const {
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 78
78 const Toolchain::Tool& Toolchain::GetTool(ToolType type) const { 79 const Toolchain::Tool& Toolchain::GetTool(ToolType type) const {
79 DCHECK(type != TYPE_NONE); 80 DCHECK(type != TYPE_NONE);
80 return tools_[static_cast<size_t>(type)]; 81 return tools_[static_cast<size_t>(type)];
81 } 82 }
82 83
83 void Toolchain::SetTool(ToolType type, const Tool& t) { 84 void Toolchain::SetTool(ToolType type, const Tool& t) {
84 DCHECK(type != TYPE_NONE); 85 DCHECK(type != TYPE_NONE);
85 tools_[static_cast<size_t>(type)] = t; 86 tools_[static_cast<size_t>(type)] = t;
86 } 87 }
OLDNEW
« no previous file with comments | « tools/gn/toolchain.h ('k') | tools/gn/toolchain_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698