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

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

Issue 2940873002: Implement tracking of BUILD.gn files used to define target, toolchain or (Closed)
Patch Set: Use base::flat_set instead of std::set. Created 3 years, 5 months 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
« tools/gn/scope_unittest.cc ('K') | « tools/gn/toolchain.h ('k') | no next file » | 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 <stddef.h> 7 #include <stddef.h>
8 #include <string.h> 8 #include <string.h>
9 #include <utility> 9 #include <utility>
10 10
11 #include "base/logging.h" 11 #include "base/logging.h"
12 #include "tools/gn/target.h" 12 #include "tools/gn/target.h"
13 #include "tools/gn/value.h" 13 #include "tools/gn/value.h"
14 14
15 const char* Toolchain::kToolCc = "cc"; 15 const char* Toolchain::kToolCc = "cc";
16 const char* Toolchain::kToolCxx = "cxx"; 16 const char* Toolchain::kToolCxx = "cxx";
17 const char* Toolchain::kToolObjC = "objc"; 17 const char* Toolchain::kToolObjC = "objc";
18 const char* Toolchain::kToolObjCxx = "objcxx"; 18 const char* Toolchain::kToolObjCxx = "objcxx";
19 const char* Toolchain::kToolRc = "rc"; 19 const char* Toolchain::kToolRc = "rc";
20 const char* Toolchain::kToolAsm = "asm"; 20 const char* Toolchain::kToolAsm = "asm";
21 const char* Toolchain::kToolAlink = "alink"; 21 const char* Toolchain::kToolAlink = "alink";
22 const char* Toolchain::kToolSolink = "solink"; 22 const char* Toolchain::kToolSolink = "solink";
23 const char* Toolchain::kToolSolinkModule = "solink_module"; 23 const char* Toolchain::kToolSolinkModule = "solink_module";
24 const char* Toolchain::kToolLink = "link"; 24 const char* Toolchain::kToolLink = "link";
25 const char* Toolchain::kToolStamp = "stamp"; 25 const char* Toolchain::kToolStamp = "stamp";
26 const char* Toolchain::kToolCopy = "copy"; 26 const char* Toolchain::kToolCopy = "copy";
27 const char* Toolchain::kToolCopyBundleData = "copy_bundle_data"; 27 const char* Toolchain::kToolCopyBundleData = "copy_bundle_data";
28 const char* Toolchain::kToolCompileXCAssets = "compile_xcassets"; 28 const char* Toolchain::kToolCompileXCAssets = "compile_xcassets";
29 29
30 Toolchain::Toolchain(const Settings* settings, const Label& label) 30 Toolchain::Toolchain(const Settings* settings,
31 : Item(settings, label), 31 const Label& label,
32 setup_complete_(false) { 32 const InputFileSet& input_files)
33 } 33 : Item(settings, label, input_files), setup_complete_(false) {}
34 34
35 Toolchain::~Toolchain() { 35 Toolchain::~Toolchain() {
36 } 36 }
37 37
38 Toolchain* Toolchain::AsToolchain() { 38 Toolchain* Toolchain::AsToolchain() {
39 return this; 39 return this;
40 } 40 }
41 41
42 const Toolchain* Toolchain::AsToolchain() const { 42 const Toolchain* Toolchain::AsToolchain() const {
43 return this; 43 return this;
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 return TYPE_STAMP; 169 return TYPE_STAMP;
170 default: 170 default:
171 NOTREACHED(); 171 NOTREACHED();
172 return Toolchain::TYPE_NONE; 172 return Toolchain::TYPE_NONE;
173 } 173 }
174 } 174 }
175 175
176 const Tool* Toolchain::GetToolForTargetFinalOutput(const Target* target) const { 176 const Tool* Toolchain::GetToolForTargetFinalOutput(const Target* target) const {
177 return tools_[GetToolTypeForTargetFinalOutput(target)].get(); 177 return tools_[GetToolTypeForTargetFinalOutput(target)].get();
178 } 178 }
OLDNEW
« tools/gn/scope_unittest.cc ('K') | « tools/gn/toolchain.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698