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

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

Issue 1123283003: GN: Don't generate phony rules called "all". (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 <vector> 10 #include <vector>
10 11
11 #include "tools/gn/path_output.h" 12 #include "tools/gn/path_output.h"
12 13
13 class BuildSettings; 14 class BuildSettings;
14 class Err; 15 class Err;
15 class Settings; 16 class Settings;
16 class Target; 17 class Target;
17 class Toolchain; 18 class Toolchain;
18 19
(...skipping 18 matching lines...) Expand all
37 std::ostream& dep_out); 38 std::ostream& dep_out);
38 ~NinjaBuildWriter(); 39 ~NinjaBuildWriter();
39 40
40 bool Run(Err* err); 41 bool Run(Err* err);
41 42
42 void WriteNinjaRules(); 43 void WriteNinjaRules();
43 void WriteLinkPool(); 44 void WriteLinkPool();
44 void WriteSubninjas(); 45 void WriteSubninjas();
45 bool WritePhonyAndAllRules(Err* err); 46 bool WritePhonyAndAllRules(Err* err);
46 47
47 void WritePhonyRule(const Target* target, const OutputFile& target_file, 48 // Writes a phony rule for the given target with the given name. Adds the new
48 const std::string& phony_name); 49 // name to the given set. If the name is already in the set, does nothing.
50 void WritePhonyRule(const Target* target,
51 const OutputFile& target_file,
52 const std::string& phony_name,
53 std::set<std::string>* written_rules);
49 54
50 const BuildSettings* build_settings_; 55 const BuildSettings* build_settings_;
51 std::vector<const Settings*> all_settings_; 56 std::vector<const Settings*> all_settings_;
52 const Toolchain* default_toolchain_; 57 const Toolchain* default_toolchain_;
53 std::vector<const Target*> default_toolchain_targets_; 58 std::vector<const Target*> default_toolchain_targets_;
54 std::ostream& out_; 59 std::ostream& out_;
55 std::ostream& dep_out_; 60 std::ostream& dep_out_;
56 PathOutput path_output_; 61 PathOutput path_output_;
57 62
58 DISALLOW_COPY_AND_ASSIGN(NinjaBuildWriter); 63 DISALLOW_COPY_AND_ASSIGN(NinjaBuildWriter);
59 }; 64 };
60 65
61 #endif // TOOLS_GN_NINJA_BUILD_WRITER_H_ 66 #endif // TOOLS_GN_NINJA_BUILD_WRITER_H_
62 67
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