16d528ed9Sopenharmony_ci// Copyright 2014 The Chromium Authors. All rights reserved. 26d528ed9Sopenharmony_ci// Use of this source code is governed by a BSD-style license that can be 36d528ed9Sopenharmony_ci// found in the LICENSE file. 46d528ed9Sopenharmony_ci 56d528ed9Sopenharmony_ci#ifndef TOOLS_GN_NINJA_UTILS_H_ 66d528ed9Sopenharmony_ci#define TOOLS_GN_NINJA_UTILS_H_ 76d528ed9Sopenharmony_ci 86d528ed9Sopenharmony_ci#include <string> 96d528ed9Sopenharmony_ci 106d528ed9Sopenharmony_ciclass Settings; 116d528ed9Sopenharmony_ciclass SourceFile; 126d528ed9Sopenharmony_ciclass Target; 136d528ed9Sopenharmony_ci 146d528ed9Sopenharmony_ci// Example: "base/base.ninja". The string version will not be escaped, and 156d528ed9Sopenharmony_ci// will always have slashes for path separators. 166d528ed9Sopenharmony_ciSourceFile GetNinjaFileForTarget(const Target* target); 176d528ed9Sopenharmony_ci 186d528ed9Sopenharmony_ci// Returns the name of the root .ninja file for the given toolchain. 196d528ed9Sopenharmony_ciSourceFile GetNinjaFileForToolchain(const Settings* settings); 206d528ed9Sopenharmony_ci 216d528ed9Sopenharmony_ci// Returns the prefix applied to the Ninja rules in a given toolchain so they 226d528ed9Sopenharmony_ci// don't collide with rules from other toolchains. 236d528ed9Sopenharmony_cistd::string GetNinjaRulePrefixForToolchain(const Settings* settings); 246d528ed9Sopenharmony_ci 256d528ed9Sopenharmony_ci#endif // TOOLS_GN_NINJA_UTILS_H_ 26