1// Copyright 2014 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_UTILS_H_
6#define TOOLS_GN_NINJA_UTILS_H_
7
8#include <string>
9
10class Settings;
11class SourceFile;
12class Target;
13
14// Example: "base/base.ninja". The string version will not be escaped, and
15// will always have slashes for path separators.
16SourceFile GetNinjaFileForTarget(const Target* target);
17
18// Returns the name of the root .ninja file for the given toolchain.
19SourceFile GetNinjaFileForToolchain(const Settings* settings);
20
21// Returns the prefix applied to the Ninja rules in a given toolchain so they
22// don't collide with rules from other toolchains.
23std::string GetNinjaRulePrefixForToolchain(const Settings* settings);
24
25#endif  // TOOLS_GN_NINJA_UTILS_H_
26