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

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

Issue 455193003: GN: Generate error if multiple rules generate same file (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Just check outputs when producing final ninja file Created 6 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | tools/gn/ninja_build_writer.cc » ('j') | tools/gn/ninja_build_writer.cc » ('J')
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 <vector> 9 #include <vector>
10 10
(...skipping 17 matching lines...) Expand all
28 28
29 private: 29 private:
30 NinjaBuildWriter(const BuildSettings* settings, 30 NinjaBuildWriter(const BuildSettings* settings,
31 const std::vector<const Settings*>& all_settings, 31 const std::vector<const Settings*>& all_settings,
32 const Toolchain* default_toolchain, 32 const Toolchain* default_toolchain,
33 const std::vector<const Target*>& default_toolchain_targets, 33 const std::vector<const Target*>& default_toolchain_targets,
34 std::ostream& out, 34 std::ostream& out,
35 std::ostream& dep_out); 35 std::ostream& dep_out);
36 ~NinjaBuildWriter(); 36 ~NinjaBuildWriter();
37 37
38 void Run(); 38 bool Run();
39 39
40 void WriteNinjaRules(); 40 void WriteNinjaRules();
41 void WriteLinkPool(); 41 void WriteLinkPool();
42 void WriteSubninjas(); 42 void WriteSubninjas();
43 void WritePhonyAndAllRules(); 43 bool WritePhonyAndAllRules();
44 44
45 void WritePhonyRule(const Target* target, const OutputFile& target_file, 45 void WritePhonyRule(const Target* target, const OutputFile& target_file,
46 const std::string& phony_name); 46 const std::string& phony_name);
47 47
48 const BuildSettings* build_settings_; 48 const BuildSettings* build_settings_;
49 std::vector<const Settings*> all_settings_; 49 std::vector<const Settings*> all_settings_;
50 const Toolchain* default_toolchain_; 50 const Toolchain* default_toolchain_;
51 std::vector<const Target*> default_toolchain_targets_; 51 std::vector<const Target*> default_toolchain_targets_;
52 std::ostream& out_; 52 std::ostream& out_;
53 std::ostream& dep_out_; 53 std::ostream& dep_out_;
54 PathOutput path_output_; 54 PathOutput path_output_;
55 55
56 DISALLOW_COPY_AND_ASSIGN(NinjaBuildWriter); 56 DISALLOW_COPY_AND_ASSIGN(NinjaBuildWriter);
57 }; 57 };
58 58
59 #endif // TOOLS_GN_NINJA_BUILD_GENERATOR_H_ 59 #endif // TOOLS_GN_NINJA_BUILD_GENERATOR_H_
60 60
OLDNEW
« no previous file with comments | « no previous file | tools/gn/ninja_build_writer.cc » ('j') | tools/gn/ninja_build_writer.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698