OLD | NEW |
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 Loading... |
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 |
OLD | NEW |