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_SCHEDULER_H_ | 5 #ifndef TOOLS_GN_SCHEDULER_H_ |
6 #define TOOLS_GN_SCHEDULER_H_ | 6 #define TOOLS_GN_SCHEDULER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 | 9 |
10 #include "base/atomic_ref_count.h" | 10 #include "base/atomic_ref_count.h" |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 // TODO(brettw) this is global rather than per-BuildSettings. If we | 49 // TODO(brettw) this is global rather than per-BuildSettings. If we |
50 // start using >1 build settings, then we probably want this to take a | 50 // start using >1 build settings, then we probably want this to take a |
51 // BuildSettings object so we know the depdency on a per-build basis. | 51 // BuildSettings object so we know the depdency on a per-build basis. |
52 // If moved, most of the Add/Get functions below should move as well. | 52 // If moved, most of the Add/Get functions below should move as well. |
53 void AddGenDependency(const base::FilePath& file); | 53 void AddGenDependency(const base::FilePath& file); |
54 std::vector<base::FilePath> GetGenDependencies() const; | 54 std::vector<base::FilePath> GetGenDependencies() const; |
55 | 55 |
56 // Tracks calls to write_file for resolving with the unknown generated | 56 // Tracks calls to write_file for resolving with the unknown generated |
57 // inputs (see AddUnknownGeneratedInput below). | 57 // inputs (see AddUnknownGeneratedInput below). |
58 void AddWrittenFile(const SourceFile& file); | 58 void AddWrittenFile(const SourceFile& file); |
| 59 std::vector<SourceFile> GetWrittenFiles() const; |
59 | 60 |
60 // Unknown generated inputs are files that a target declares as an input | 61 // Unknown generated inputs are files that a target declares as an input |
61 // in the output directory, but which aren't generated by any dependency. | 62 // in the output directory, but which aren't generated by any dependency. |
62 // | 63 // |
63 // Some of these files will be files written by write_file and will be | 64 // Some of these files will be files written by write_file and will be |
64 // GenDependencies (see AddWrittenFile above). There are OK and include | 65 // GenDependencies (see AddWrittenFile above). There are OK and include |
65 // things like response files for scripts. Others cases will be ones where | 66 // things like response files for scripts. Others cases will be ones where |
66 // the file is generated by a target that's not a dependency. | 67 // the file is generated by a target that's not a dependency. |
67 // | 68 // |
68 // In order to distinguish these two cases, the checking for these input | 69 // In order to distinguish these two cases, the checking for these input |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 std::vector<SourceFile> written_files_; | 116 std::vector<SourceFile> written_files_; |
116 std::multimap<SourceFile, const Target*> unknown_generated_inputs_; | 117 std::multimap<SourceFile, const Target*> unknown_generated_inputs_; |
117 | 118 |
118 DISALLOW_COPY_AND_ASSIGN(Scheduler); | 119 DISALLOW_COPY_AND_ASSIGN(Scheduler); |
119 }; | 120 }; |
120 | 121 |
121 extern Scheduler* g_scheduler; | 122 extern Scheduler* g_scheduler; |
122 | 123 |
123 #endif // TOOLS_GN_SCHEDULER_H_ | 124 #endif // TOOLS_GN_SCHEDULER_H_ |
124 | 125 |
OLD | NEW |