Correct blacklist entry message
[chromium-blink-merge.git] / tools / gn / ninja_build_writer.h
blob4c72ef9050c3431a94ebd53eb22bc0dda469df7a
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.
5 #ifndef TOOLS_GN_NINJA_BUILD_WRITER_H_
6 #define TOOLS_GN_NINJA_BUILD_WRITER_H_
8 #include <iosfwd>
9 #include <vector>
11 #include "tools/gn/ninja_helper.h"
12 #include "tools/gn/path_output.h"
14 class BuildSettings;
15 class Settings;
16 class Target;
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);
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 std::ostream& dep_out);
34 ~NinjaBuildWriter();
36 void Run();
38 void WriteNinjaRules();
39 void WriteSubninjas();
40 void WritePhonyAndAllRules();
42 const BuildSettings* build_settings_;
43 std::vector<const Settings*> all_settings_;
44 std::vector<const Target*> default_toolchain_targets_;
45 std::ostream& out_;
46 std::ostream& dep_out_;
47 PathOutput path_output_;
49 NinjaHelper helper_;
51 DISALLOW_COPY_AND_ASSIGN(NinjaBuildWriter);
54 #endif // TOOLS_GN_NINJA_BUILD_GENERATOR_H_