Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(715)

Side by Side Diff: tools/gn/ninja_build_writer.h

Issue 1958783003: GN: Prefer toplevel targets for phony names. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review comments Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | tools/gn/ninja_build_writer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_NINJA_BUILD_WRITER_H_ 5 #ifndef TOOLS_GN_NINJA_BUILD_WRITER_H_
6 #define TOOLS_GN_NINJA_BUILD_WRITER_H_ 6 #define TOOLS_GN_NINJA_BUILD_WRITER_H_
7 7
8 #include <iosfwd> 8 #include <iosfwd>
9 #include <set> 9 #include <set>
10 #include <vector> 10 #include <vector>
(...skipping 28 matching lines...) Expand all
39 ~NinjaBuildWriter(); 39 ~NinjaBuildWriter();
40 40
41 bool Run(Err* err); 41 bool Run(Err* err);
42 42
43 private: 43 private:
44 void WriteNinjaRules(); 44 void WriteNinjaRules();
45 void WriteLinkPool(); 45 void WriteLinkPool();
46 void WriteSubninjas(); 46 void WriteSubninjas();
47 bool WritePhonyAndAllRules(Err* err); 47 bool WritePhonyAndAllRules(Err* err);
48 48
49 // Writes a phony rule for the given target with the given name. Adds the new 49 void WritePhonyRule(const Target* target, const std::string& phony_name);
50 // name to the given set. If the name is already in the set, does nothing.
51 void WritePhonyRule(const Target* target,
52 const OutputFile& target_file,
53 const std::string& phony_name,
54 std::set<std::string>* written_rules);
55 50
56 const BuildSettings* build_settings_; 51 const BuildSettings* build_settings_;
57 std::vector<const Settings*> all_settings_; 52 std::vector<const Settings*> all_settings_;
58 const Toolchain* default_toolchain_; 53 const Toolchain* default_toolchain_;
59 std::vector<const Target*> default_toolchain_targets_; 54 std::vector<const Target*> default_toolchain_targets_;
60 std::ostream& out_; 55 std::ostream& out_;
61 std::ostream& dep_out_; 56 std::ostream& dep_out_;
62 PathOutput path_output_; 57 PathOutput path_output_;
63 58
64 DISALLOW_COPY_AND_ASSIGN(NinjaBuildWriter); 59 DISALLOW_COPY_AND_ASSIGN(NinjaBuildWriter);
65 }; 60 };
66 61
67 #endif // TOOLS_GN_NINJA_BUILD_WRITER_H_ 62 #endif // TOOLS_GN_NINJA_BUILD_WRITER_H_
68 63
OLDNEW
« no previous file with comments | « no previous file | tools/gn/ninja_build_writer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698