Change next_proto member type.
[chromium-blink-merge.git] / tools / gn / ninja_utils.cc
blob60d4d3643842cd7594d678cb79daf3f99db85e32
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.
5 #include "tools/gn/ninja_utils.h"
7 #include "tools/gn/filesystem_utils.h"
8 #include "tools/gn/settings.h"
9 #include "tools/gn/target.h"
11 SourceFile GetNinjaFileForTarget(const Target* target) {
12 return SourceFile(GetTargetOutputDir(target).value() +
13 target->label().name() + ".ninja");
16 SourceFile GetNinjaFileForToolchain(const Settings* settings) {
17 return SourceFile(GetToolchainOutputDir(settings).value() +
18 "toolchain.ninja");
21 std::string GetNinjaRulePrefixForToolchain(const Settings* settings) {
22 // Don't prefix the default toolchain so it looks prettier, prefix everything
23 // else.
24 if (settings->is_default())
25 return std::string(); // Default toolchain has no prefix.
26 return settings->toolchain_label().name() + "_";