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

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

Issue 21114002: Add initial prototype for the GN meta-buildsystem. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add owners and readme Created 7 years, 4 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 | « tools/gn/location.h ('k') | 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef TOOLS_GN_NINJA_BUILD_WRITER_H_
6 #define TOOLS_GN_NINJA_BUILD_WRITER_H_
7
8 #include <iosfwd>
9 #include <vector>
10
11 #include "tools/gn/ninja_helper.h"
12 #include "tools/gn/path_output.h"
13
14 class BuildSettings;
15 class Settings;
16 class Target;
17
18 // Generates the toplevel "build.ninja" file. This references the individual
19 // toolchain files and lists all input .gn files as dependencies of the
20 // build itself.
21 class NinjaBuildWriter {
22 public:
23 static bool RunAndWriteFile(
24 const BuildSettings* settings,
25 const std::vector<const Settings*>& all_settings,
26 const std::vector<const Target*>& default_toolchain_targets);
27
28 private:
29 NinjaBuildWriter(const BuildSettings* settings,
30 const std::vector<const Settings*>& all_settings,
31 const std::vector<const Target*>& default_toolchain_targets,
32 std::ostream& out);
33 ~NinjaBuildWriter();
34
35 void Run();
36
37 void WriteNinjaRules();
38 void WriteSubninjas();
39 void WritePhonyAndAllRules();
40
41 const BuildSettings* build_settings_;
42 std::vector<const Settings*> all_settings_;
43 std::vector<const Target*> default_toolchain_targets_;
44 std::ostream& out_;
45 PathOutput path_output_;
46
47 NinjaHelper helper_;
48
49 DISALLOW_COPY_AND_ASSIGN(NinjaBuildWriter);
50 };
51
52 #endif // TOOLS_GN_NINJA_BUILD_GENERATOR_H_
53
OLDNEW
« no previous file with comments | « tools/gn/location.h ('k') | tools/gn/ninja_build_writer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698