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

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

Issue 1690843002: gn: Add runtime_link_output to tool("solib") (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: e Created 4 years, 10 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
« no previous file with comments | « tools/gn/function_toolchain.cc ('k') | tools/gn/target.h » ('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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/runtime_deps.h" 5 #include "tools/gn/runtime_deps.h"
6 6
7 #include <map> 7 #include <map>
8 #include <set> 8 #include <set>
9 #include <sstream> 9 #include <sstream>
10 10
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 str, 46 str,
47 source->settings()->build_settings()->build_dir(), 47 source->settings()->build_settings()->build_dir(),
48 source->settings()->build_settings()->root_path_utf8())); 48 source->settings()->build_settings()->root_path_utf8()));
49 AddIfNew(output_file, source, deps, found_file); 49 AddIfNew(output_file, source, deps, found_file);
50 } 50 }
51 51
52 // Returns the output file that the runtime deps considers for the given 52 // Returns the output file that the runtime deps considers for the given
53 // targets. This is weird only for shared libraries. 53 // targets. This is weird only for shared libraries.
54 const OutputFile& GetMainOutput(const Target* target) { 54 const OutputFile& GetMainOutput(const Target* target) {
55 if (target->output_type() == Target::SHARED_LIBRARY) 55 if (target->output_type() == Target::SHARED_LIBRARY)
56 return target->link_output_file(); 56 return target->runtime_link_output_file();
57 return target->dependency_output_file(); 57 return target->dependency_output_file();
58 } 58 }
59 59
60 // To avoid duplicate traversals of targets, or duplicating output files that 60 // To avoid duplicate traversals of targets, or duplicating output files that
61 // might be listed by more than one target, the set of targets and output files 61 // might be listed by more than one target, the set of targets and output files
62 // that have been found so far is passed. The "value" of the seen_targets map 62 // that have been found so far is passed. The "value" of the seen_targets map
63 // is a boolean indicating if the seen dep was a data dep (true = data_dep). 63 // is a boolean indicating if the seen dep was a data dep (true = data_dep).
64 // data deps add more stuff, so we will want to revisit a target if it's a 64 // data deps add more stuff, so we will want to revisit a target if it's a
65 // data dependency and we've previously only seen it as a regular dep. 65 // data dependency and we've previously only seen it as a regular dep.
66 void RecursiveCollectRuntimeDeps(const Target* target, 66 void RecursiveCollectRuntimeDeps(const Target* target,
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 return false; 265 return false;
266 } 266 }
267 267
268 // Currently this writes all runtime deps files sequentially. We generally 268 // Currently this writes all runtime deps files sequentially. We generally
269 // expect few of these. We can run this on the worker pool if it looks 269 // expect few of these. We can run this on the worker pool if it looks
270 // like it's talking a long time. 270 // like it's talking a long time.
271 WriteRuntimeDepsFile(target); 271 WriteRuntimeDepsFile(target);
272 } 272 }
273 return true; 273 return true;
274 } 274 }
OLDNEW
« no previous file with comments | « tools/gn/function_toolchain.cc ('k') | tools/gn/target.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698