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

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

Issue 1130183007: Add runtime dependency extraction for GN. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: make msvc happy Created 5 years, 7 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/command_desc.cc ('k') | tools/gn/command_help.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 "base/atomicops.h" 5 #include "base/atomicops.h"
6 #include "base/bind.h" 6 #include "base/bind.h"
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/strings/string_number_conversions.h" 8 #include "base/strings/string_number_conversions.h"
9 #include "base/timer/elapsed_timer.h" 9 #include "base/timer/elapsed_timer.h"
10 #include "tools/gn/build_settings.h" 10 #include "tools/gn/build_settings.h"
11 #include "tools/gn/commands.h" 11 #include "tools/gn/commands.h"
12 #include "tools/gn/ninja_target_writer.h" 12 #include "tools/gn/ninja_target_writer.h"
13 #include "tools/gn/ninja_writer.h" 13 #include "tools/gn/ninja_writer.h"
14 #include "tools/gn/runtime_deps.h"
14 #include "tools/gn/scheduler.h" 15 #include "tools/gn/scheduler.h"
15 #include "tools/gn/setup.h" 16 #include "tools/gn/setup.h"
16 #include "tools/gn/standard_out.h" 17 #include "tools/gn/standard_out.h"
17 #include "tools/gn/switches.h" 18 #include "tools/gn/switches.h"
18 #include "tools/gn/target.h" 19 #include "tools/gn/target.h"
19 20
20 namespace commands { 21 namespace commands {
21 22
22 namespace { 23 namespace {
23 24
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 95
95 Err err; 96 Err err;
96 // Write the root ninja files. 97 // Write the root ninja files.
97 if (!NinjaWriter::RunAndWriteFiles(&setup->build_settings(), 98 if (!NinjaWriter::RunAndWriteFiles(&setup->build_settings(),
98 setup->builder(), 99 setup->builder(),
99 &err)) { 100 &err)) {
100 err.PrintToStdout(); 101 err.PrintToStdout();
101 return 1; 102 return 1;
102 } 103 }
103 104
105 if (!WriteRuntimeDepsFilesIfNecessary(*setup->builder(), &err)) {
106 err.PrintToStdout();
107 return 1;
108 }
109
104 base::TimeDelta elapsed_time = timer.Elapsed(); 110 base::TimeDelta elapsed_time = timer.Elapsed();
105 111
106 if (!base::CommandLine::ForCurrentProcess()->HasSwitch(switches::kQuiet)) { 112 if (!base::CommandLine::ForCurrentProcess()->HasSwitch(switches::kQuiet)) {
107 OutputString("Done. ", DECORATION_GREEN); 113 OutputString("Done. ", DECORATION_GREEN);
108 114
109 std::string stats = "Wrote " + 115 std::string stats = "Wrote " +
110 base::IntToString(static_cast<int>(write_counter)) + 116 base::IntToString(static_cast<int>(write_counter)) +
111 " targets from " + 117 " targets from " +
112 base::IntToString( 118 base::IntToString(
113 setup->scheduler().input_file_manager()->GetInputFileCount()) + 119 setup->scheduler().input_file_manager()->GetInputFileCount()) +
114 " files in " + 120 " files in " +
115 base::Int64ToString(elapsed_time.InMilliseconds()) + "ms\n"; 121 base::Int64ToString(elapsed_time.InMilliseconds()) + "ms\n";
116 OutputString(stats); 122 OutputString(stats);
117 } 123 }
118 124
119 return 0; 125 return 0;
120 } 126 }
121 127
122 } // namespace commands 128 } // namespace commands
OLDNEW
« no previous file with comments | « tools/gn/command_desc.cc ('k') | tools/gn/command_help.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698