blob: f0611d7337d0cd0f983eeb0543b2fe8a4d633025 [file] [log] [blame]
// Copyright (c) 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef TOOLS_GN_NINJA_BINARY_TARGET_WRITER_H_
#define TOOLS_GN_NINJA_BINARY_TARGET_WRITER_H_
#include "base/macros.h"
#include "tools/gn/c_tool.h"
#include "tools/gn/config_values.h"
#include "tools/gn/ninja_target_writer.h"
#include "tools/gn/toolchain.h"
#include "tools/gn/unique_vector.h"
struct EscapeOptions;
// Writes a .ninja file for a binary target type (an executable, a shared
// library, or a static library).
class NinjaBinaryTargetWriter : public NinjaTargetWriter {
public:
NinjaBinaryTargetWriter(const Target* target, std::ostream& out);
~NinjaBinaryTargetWriter() override;
void Run() override;
protected:
typedef std::set<OutputFile> OutputFileSet;
// Cached version of the prefix used for rule types for this toolchain.
std::string rule_prefix_;
DISALLOW_COPY_AND_ASSIGN(NinjaBinaryTargetWriter);
};
#endif // TOOLS_GN_NINJA_BINARY_TARGET_WRITER_H_