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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 Target* AsTarget() override; | 61 Target* AsTarget() override; |
62 const Target* AsTarget() const override; | 62 const Target* AsTarget() const override; |
63 bool OnResolved(Err* err) override; | 63 bool OnResolved(Err* err) override; |
64 | 64 |
65 OutputType output_type() const { return output_type_; } | 65 OutputType output_type() const { return output_type_; } |
66 void set_output_type(OutputType t) { output_type_ = t; } | 66 void set_output_type(OutputType t) { output_type_ = t; } |
67 | 67 |
68 // Can be linked into other targets. | 68 // Can be linked into other targets. |
69 bool IsLinkable() const; | 69 bool IsLinkable() const; |
70 | 70 |
71 // Can have dependencies linked in. | 71 // True if the target links dependencies rather than propogated up the graph. |
| 72 // This is also true of action and copy steps even though they don't link |
| 73 // dependencies, because they also don't propogate libraries up. |
72 bool IsFinal() const; | 74 bool IsFinal() const; |
73 | 75 |
74 // Will be the empty string to use the target label as the output name. | 76 // Will be the empty string to use the target label as the output name. |
75 // See GetComputedOutputName(). | 77 // See GetComputedOutputName(). |
76 const std::string& output_name() const { return output_name_; } | 78 const std::string& output_name() const { return output_name_; } |
77 void set_output_name(const std::string& name) { output_name_ = name; } | 79 void set_output_name(const std::string& name) { output_name_ = name; } |
78 | 80 |
79 // Returns the output name for this target, which is the output_name if | 81 // Returns the output name for this target, which is the output_name if |
80 // specified, or the target label if not. If the flag is set, it will also | 82 // specified, or the target label if not. If the flag is set, it will also |
81 // include any output prefix specified on the tool (often "lib" on Linux). | 83 // include any output prefix specified on the tool (often "lib" on Linux). |
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
319 | 321 |
320 // Output files. Empty until the target is resolved. | 322 // Output files. Empty until the target is resolved. |
321 std::vector<OutputFile> computed_outputs_; | 323 std::vector<OutputFile> computed_outputs_; |
322 OutputFile link_output_file_; | 324 OutputFile link_output_file_; |
323 OutputFile dependency_output_file_; | 325 OutputFile dependency_output_file_; |
324 | 326 |
325 DISALLOW_COPY_AND_ASSIGN(Target); | 327 DISALLOW_COPY_AND_ASSIGN(Target); |
326 }; | 328 }; |
327 | 329 |
328 #endif // TOOLS_GN_TARGET_H_ | 330 #endif // TOOLS_GN_TARGET_H_ |
OLD | NEW |