| Index: tools/gn/target.h
|
| diff --git a/tools/gn/target.h b/tools/gn/target.h
|
| index eff4d150d53e5dd3a7856926c3ab0ed7d6925f3a..cbdab35761ef8e77c545921b5e958743b271951b 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 (all types of libaries and
|
| + // 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);
|
|
|
|
|