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 #ifndef TOOLS_GN_TARGET_H_ | 5 #ifndef TOOLS_GN_TARGET_H_ |
6 #define TOOLS_GN_TARGET_H_ | 6 #define TOOLS_GN_TARGET_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
285 // | 285 // |
286 // These are only known once the target is resolved and will be empty before | 286 // These are only known once the target is resolved and will be empty before |
287 // that. This is a cache of the files to prevent every target that depends on | 287 // that. This is a cache of the files to prevent every target that depends on |
288 // a given library from recomputing the same pattern. | 288 // a given library from recomputing the same pattern. |
289 const OutputFile& link_output_file() const { | 289 const OutputFile& link_output_file() const { |
290 return link_output_file_; | 290 return link_output_file_; |
291 } | 291 } |
292 const OutputFile& dependency_output_file() const { | 292 const OutputFile& dependency_output_file() const { |
293 return dependency_output_file_; | 293 return dependency_output_file_; |
294 } | 294 } |
295 const OutputFile& runtime_link_output_file() const { | 295 |
296 return runtime_link_output_file_; | 296 // The subset of computed_outputs that are considered runtime outputs. |
| 297 const std::vector<OutputFile>& runtime_outputs() const { |
| 298 return runtime_outputs_; |
297 } | 299 } |
298 | 300 |
299 // Computes the set of output files resulting from compiling the given source | 301 // Computes the set of output files resulting from compiling the given source |
300 // file. If the file can be compiled and the tool exists, fills the outputs | 302 // file. If the file can be compiled and the tool exists, fills the outputs |
301 // in and writes the tool type to computed_tool_type. If the file is not | 303 // in and writes the tool type to computed_tool_type. If the file is not |
302 // compilable, returns false. | 304 // compilable, returns false. |
303 // | 305 // |
304 // The function can succeed with a "NONE" tool type for object files which | 306 // The function can succeed with a "NONE" tool type for object files which |
305 // are just passed to the output. The output will always be overwritten, not | 307 // are just passed to the output. The output will always be overwritten, not |
306 // appended to. | 308 // appended to. |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
385 // Used for action[_foreach] targets. | 387 // Used for action[_foreach] targets. |
386 ActionValues action_values_; | 388 ActionValues action_values_; |
387 | 389 |
388 // Toolchain used by this target. Null until target is resolved. | 390 // Toolchain used by this target. Null until target is resolved. |
389 const Toolchain* toolchain_; | 391 const Toolchain* toolchain_; |
390 | 392 |
391 // Output files. Empty until the target is resolved. | 393 // Output files. Empty until the target is resolved. |
392 std::vector<OutputFile> computed_outputs_; | 394 std::vector<OutputFile> computed_outputs_; |
393 OutputFile link_output_file_; | 395 OutputFile link_output_file_; |
394 OutputFile dependency_output_file_; | 396 OutputFile dependency_output_file_; |
395 OutputFile runtime_link_output_file_; | 397 std::vector<OutputFile> runtime_outputs_; |
396 | 398 |
397 DISALLOW_COPY_AND_ASSIGN(Target); | 399 DISALLOW_COPY_AND_ASSIGN(Target); |
398 }; | 400 }; |
399 | 401 |
400 #endif // TOOLS_GN_TARGET_H_ | 402 #endif // TOOLS_GN_TARGET_H_ |
OLD | NEW |