| 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; | |
| 60 | 59 |
| 61 // Unknown generated inputs are files that a target declares as an input | 60 // Unknown generated inputs are files that a target declares as an input |
| 62 // in the output directory, but which aren't generated by any dependency. | 61 // in the output directory, but which aren't generated by any dependency. |
| 63 // | 62 // |
| 64 // Some of these files will be files written by write_file and will be | 63 // Some of these files will be files written by write_file and will be |
| 65 // GenDependencies (see AddWrittenFile above). There are OK and include | 64 // GenDependencies (see AddWrittenFile above). There are OK and include |
| 66 // things like response files for scripts. Others cases will be ones where | 65 // things like response files for scripts. Others cases will be ones where |
| 67 // the file is generated by a target that's not a dependency. | 66 // the file is generated by a target that's not a dependency. |
| 68 // | 67 // |
| 69 // In order to distinguish these two cases, the checking for these input | 68 // 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... |
| 116 std::vector<SourceFile> written_files_; | 115 std::vector<SourceFile> written_files_; |
| 117 std::multimap<SourceFile, const Target*> unknown_generated_inputs_; | 116 std::multimap<SourceFile, const Target*> unknown_generated_inputs_; |
| 118 | 117 |
| 119 DISALLOW_COPY_AND_ASSIGN(Scheduler); | 118 DISALLOW_COPY_AND_ASSIGN(Scheduler); |
| 120 }; | 119 }; |
| 121 | 120 |
| 122 extern Scheduler* g_scheduler; | 121 extern Scheduler* g_scheduler; |
| 123 | 122 |
| 124 #endif // TOOLS_GN_SCHEDULER_H_ | 123 #endif // TOOLS_GN_SCHEDULER_H_ |
| 125 | 124 |
| OLD | NEW |