| 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> |
| 11 | 11 |
| 12 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
| 13 #include "base/compiler_specific.h" | |
| 14 #include "base/logging.h" | 13 #include "base/logging.h" |
| 15 #include "base/strings/string_piece.h" | 14 #include "base/strings/string_piece.h" |
| 16 #include "base/synchronization/lock.h" | 15 #include "base/synchronization/lock.h" |
| 17 #include "tools/gn/action_values.h" | 16 #include "tools/gn/action_values.h" |
| 18 #include "tools/gn/config_values.h" | 17 #include "tools/gn/config_values.h" |
| 19 #include "tools/gn/item.h" | 18 #include "tools/gn/item.h" |
| 20 #include "tools/gn/label_ptr.h" | 19 #include "tools/gn/label_ptr.h" |
| 21 #include "tools/gn/ordered_set.h" | 20 #include "tools/gn/ordered_set.h" |
| 22 #include "tools/gn/output_file.h" | 21 #include "tools/gn/output_file.h" |
| 23 #include "tools/gn/source_file.h" | 22 #include "tools/gn/source_file.h" |
| (...skipping 21 matching lines...) Expand all Loading... |
| 45 | 44 |
| 46 enum DepsIterationType { | 45 enum DepsIterationType { |
| 47 DEPS_ALL, // Iterates through all public, private, and data deps. | 46 DEPS_ALL, // Iterates through all public, private, and data deps. |
| 48 DEPS_LINKED, // Iterates through all non-data dependencies. | 47 DEPS_LINKED, // Iterates through all non-data dependencies. |
| 49 }; | 48 }; |
| 50 | 49 |
| 51 typedef std::vector<SourceFile> FileList; | 50 typedef std::vector<SourceFile> FileList; |
| 52 typedef std::vector<std::string> StringVector; | 51 typedef std::vector<std::string> StringVector; |
| 53 | 52 |
| 54 Target(const Settings* settings, const Label& label); | 53 Target(const Settings* settings, const Label& label); |
| 55 virtual ~Target(); | 54 ~Target() override; |
| 56 | 55 |
| 57 // Returns a string naming the output type. | 56 // Returns a string naming the output type. |
| 58 static const char* GetStringForOutputType(OutputType type); | 57 static const char* GetStringForOutputType(OutputType type); |
| 59 | 58 |
| 60 // Item overrides. | 59 // Item overrides. |
| 61 virtual Target* AsTarget() override; | 60 Target* AsTarget() override; |
| 62 virtual const Target* AsTarget() const override; | 61 const Target* AsTarget() const override; |
| 63 virtual bool OnResolved(Err* err) override; | 62 bool OnResolved(Err* err) override; |
| 64 | 63 |
| 65 OutputType output_type() const { return output_type_; } | 64 OutputType output_type() const { return output_type_; } |
| 66 void set_output_type(OutputType t) { output_type_ = t; } | 65 void set_output_type(OutputType t) { output_type_ = t; } |
| 67 | 66 |
| 68 // Can be linked into other targets. | 67 // Can be linked into other targets. |
| 69 bool IsLinkable() const; | 68 bool IsLinkable() const; |
| 70 | 69 |
| 71 // Can have dependencies linked in. | 70 // Can have dependencies linked in. |
| 72 bool IsFinal() const; | 71 bool IsFinal() const; |
| 73 | 72 |
| (...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 309 const Toolchain* toolchain_; | 308 const Toolchain* toolchain_; |
| 310 | 309 |
| 311 // Output files. Null until the target is resolved. | 310 // Output files. Null until the target is resolved. |
| 312 OutputFile link_output_file_; | 311 OutputFile link_output_file_; |
| 313 OutputFile dependency_output_file_; | 312 OutputFile dependency_output_file_; |
| 314 | 313 |
| 315 DISALLOW_COPY_AND_ASSIGN(Target); | 314 DISALLOW_COPY_AND_ASSIGN(Target); |
| 316 }; | 315 }; |
| 317 | 316 |
| 318 #endif // TOOLS_GN_TARGET_H_ | 317 #endif // TOOLS_GN_TARGET_H_ |
| OLD | NEW |