Pull buildtools to get GN r282653
This uses the proto file directory for the generated files rather than the directory of the BUILD file. This makes it more natural when you have a BUILD file in a different directory than the proto files.
Fixes a search-and-replace error that accidentally changed the fallback source_prereqs code to use "inputs".
Fix ozone build.
BUG=
R=ajwong@chromium.org
Review URL: https://codereview.chromium.org/386943006
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 3b6e6832197c9b46e2f62ff0f0d61ffb05c17ff4
diff --git a/tools/gn/file_template.h b/tools/gn/file_template.h
index ddbd67f..2071336 100644
--- a/tools/gn/file_template.h
+++ b/tools/gn/file_template.h
@@ -129,8 +129,9 @@
static const char* GetNinjaVariableNameForType(Subrange::Type type);
// Extracts the given type of substitution from the given source file.
- // If output_style is RELATIVE, relative_to indicates the directory that the
- // relative directories should be relative to, otherwise it is ignored.
+ // If output_style is OUTPUT_RELATIVE, relative_to indicates the directory
+ // that the relative directories should be relative to, otherwise it is
+ // ignored.
static std::string GetSubstitution(const Settings* settings,
const SourceFile& source,
Subrange::Type type,
diff --git a/tools/gn/filesystem_utils.cc b/tools/gn/filesystem_utils.cc
index 17fec9f..097a227 100644
--- a/tools/gn/filesystem_utils.cc
+++ b/tools/gn/filesystem_utils.cc
@@ -340,7 +340,7 @@
// This check will be wrong for all proper prefixes "e.g. "/output" will
// match "/out" but we don't really care since this is just a sanity check.
const std::string& dir_str = dir.value();
- if (str.compare(0, dir_str.length(), dir_str, 0, dir_str.length()) == 0)
+ if (str.compare(0, dir_str.length(), dir_str) == 0)
return true; // Output directory is hardcoded.
if (allow_templates) {
diff --git a/tools/gn/target_generator.cc b/tools/gn/target_generator.cc
index d38dbd9..12d09fc 100644
--- a/tools/gn/target_generator.cc
+++ b/tools/gn/target_generator.cc
@@ -163,10 +163,10 @@
void TargetGenerator::FillInputs() {
const Value* value = scope_->GetValue(variables::kInputs, true);
if (!value) {
- // Older versions used "inputs". Allow use of this variable until
+ // Older versions used "source_prereqs". Allow use of this variable until
// all callers are updated.
// TODO(brettw) remove this eventually.
- value = scope_->GetValue("inputs", true);
+ value = scope_->GetValue("source_prereqs", true);
if (!value)
return;