Chromium Code Reviews| Index: tools/gn/target.h |
| diff --git a/tools/gn/target.h b/tools/gn/target.h |
| index eff4d150d53e5dd3a7856926c3ab0ed7d6925f3a..75e8c2b4f33f9664682af0850566d55a04d9ade5 100644 |
| --- a/tools/gn/target.h |
| +++ b/tools/gn/target.h |
| @@ -21,6 +21,7 @@ |
| #include "tools/gn/ordered_set.h" |
| #include "tools/gn/output_file.h" |
| #include "tools/gn/source_file.h" |
| +#include "tools/gn/toolchain.h" |
| #include "tools/gn/unique_vector.h" |
| class DepsIteratorRange; |
| @@ -66,6 +67,10 @@ class Target : public Item { |
| OutputType output_type() const { return output_type_; } |
| void set_output_type(OutputType t) { output_type_ = t; } |
| + // True for targets that compile source code (alltyeps of libaries and |
|
Petr Hosek
2016/01/20 21:40:10
Nit: a typo "all types"
|
| + // executables). |
| + bool IsBinary() const; |
| + |
| // Can be linked into other targets. |
| bool IsLinkable() const; |
| @@ -245,6 +250,18 @@ class Target : public Item { |
| return dependency_output_file_; |
| } |
| + // Computes the set of output files resulting from compiling the given source |
| + // file. If the file can be compiled and the tool exists, fills the outputs |
| + // in and writes the tool type to computed_tool_type. If the file is not |
| + // compilable, returns false. |
| + // |
| + // The function can succeed with a "NONE" tool type for object files which |
| + // are just passed to the output. The output will always be overwritten, not |
| + // appended to. |
| + bool GetOutputFilesForSource(const SourceFile& source, |
| + Toolchain::ToolType* computed_tool_type, |
| + std::vector<OutputFile>* outputs) const; |
| + |
| private: |
| FRIEND_TEST_ALL_PREFIXES(Target, ResolvePrecompiledHeaders); |