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

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

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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « trunk/src/tools/gn/toolchain.h ('k') | trunk/src/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 Settings* settings, const Label& label) 28 Toolchain::Toolchain(const Label& label) : Item(label), is_default_(false) {
29 : Item(settings, label) {
30 } 29 }
31 30
32 Toolchain::~Toolchain() { 31 Toolchain::~Toolchain() {
33 } 32 }
34 33
35 Toolchain* Toolchain::AsToolchain() { 34 Toolchain* Toolchain::AsToolchain() {
36 return this; 35 return this;
37 } 36 }
38 37
39 const Toolchain* Toolchain::AsToolchain() const { 38 const Toolchain* Toolchain::AsToolchain() const {
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 77
79 const Toolchain::Tool& Toolchain::GetTool(ToolType type) const { 78 const Toolchain::Tool& Toolchain::GetTool(ToolType type) const {
80 DCHECK(type != TYPE_NONE); 79 DCHECK(type != TYPE_NONE);
81 return tools_[static_cast<size_t>(type)]; 80 return tools_[static_cast<size_t>(type)];
82 } 81 }
83 82
84 void Toolchain::SetTool(ToolType type, const Tool& t) { 83 void Toolchain::SetTool(ToolType type, const Tool& t) {
85 DCHECK(type != TYPE_NONE); 84 DCHECK(type != TYPE_NONE);
86 tools_[static_cast<size_t>(type)] = t; 85 tools_[static_cast<size_t>(type)] = t;
87 } 86 }
OLDNEW
« no previous file with comments | « trunk/src/tools/gn/toolchain.h ('k') | trunk/src/tools/gn/toolchain_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698