Correct blacklist entry message
[chromium-blink-merge.git] / tools / gn / ninja_writer.h
blobc2efc9269e44c1f2c9d32d385c98fe0317edccd4
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_WRITER_H_
6 #define TOOLS_GN_NINJA_WRITER_H_
8 #include <set>
9 #include <string>
10 #include <vector>
12 #include "base/basictypes.h"
14 class BuildSettings;
15 class Settings;
16 class Target;
18 class NinjaWriter {
19 public:
20 // On failure will print an error and will return false.
21 static bool RunAndWriteFiles(const BuildSettings* build_settings);
23 // Writes only the toolchain.ninja files, skipping the root buildfile. The
24 // settings for the files written will be added to the vector.
26 // The skip files will avoid writing "subninja" rules when we're doing a
27 // side-by-side GYP build. .ninja files exactly matching the ones in the set
28 // will be ignored.
29 static bool RunAndWriteToolchainFiles(
30 const BuildSettings* build_settings,
31 const std::set<std::string>& skip_files,
32 std::vector<const Settings*>* all_settings);
34 private:
35 NinjaWriter(const BuildSettings* build_settings);
36 ~NinjaWriter();
38 bool WriteToolchains(
39 const std::set<std::string>& skip_files,
40 std::vector<const Settings*>* all_settings,
41 std::vector<const Target*>* default_targets);
42 bool WriteRootBuildfiles(const std::vector<const Settings*>& all_settings,
43 const std::vector<const Target*>& default_targets);
45 const BuildSettings* build_settings_;
47 DISALLOW_COPY_AND_ASSIGN(NinjaWriter);
50 #endif // TOOLS_GN_NINJA_WRITER_H_