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_TOOLCHAIN_WRITER_H_
6 #define TOOLS_GN_NINJA_TOOLCHAIN_WRITER_H_
13 #include "tools/gn/ninja_helper.h"
14 #include "tools/gn/path_output.h"
20 class NinjaToolchainWriter
{
22 // Takes the settings for the toolchain, as well as the list of all targets
23 // assicoated with the toolchain. Ninja files exactly matching "skip_files"
24 // will not be included in the subninja list.
25 static bool RunAndWriteFile(const Settings
* settings
,
26 const std::vector
<const Target
*>& targets
,
27 const std::set
<std::string
>& skip_files
);
30 NinjaToolchainWriter(const Settings
* settings
,
31 const std::vector
<const Target
*>& targets
,
32 const std::set
<std::string
>& skip_files
,
34 ~NinjaToolchainWriter();
39 void WriteSubninjas();
41 const Settings
* settings_
;
42 std::vector
<const Target
*> targets_
;
43 const std::set
<std::string
>& skip_files_
;
45 PathOutput path_output_
;
49 DISALLOW_COPY_AND_ASSIGN(NinjaToolchainWriter
);
52 #endif // TOOLS_GN_NINJA_TOOLCHAIN_WRITER_H_