Revert "Specify deps format for actions" This reverts commit 7d9b8111a2e0c31c429a064f0480f16bb8b51e0f. Reason for revert: Breaks backward compatibility with Ninja 1.8 which Chrome currently requires. Original change's description: > Specify deps format for actions > > Setting deps format is necessary for Ninja to store the depfile in its > internal dependency database. This can significantly speed up loading > for large dependency files, which can be the case for custom language > support, e.g. Go or Dart in Fuchsia, where we emit large depfiles from > actions. This also enables the use of `ninja -t deps` tool for custom > actions. > > We hardcode the format to gcc since the documentation for depfile > already explicitly specifies that "format is that of a Makefile". > > Change-Id: Iddaad90d6c1dcf0de40b0ed8fa005ac9c5b45bd6 > Reviewed-on: https://gn-review.googlesource.com/c/gn/+/8540 > Reviewed-by: Brett Wilson <brettw@chromium.org> > Commit-Queue: Petr Hosek <phosek@google.com> TBR=phosek@google.com,brettw@chromium.org,brettw@google.com # Not skipping CQ checks because original CL landed > 1 day ago. Change-Id: I4ce30794acfe0445e253719cd6c2232e296d5999 Reviewed-on: https://gn-review.googlesource.com/c/gn/+/8580 Reviewed-by: Brett Wilson <brettw@chromium.org> Commit-Queue: Brett Wilson <brettw@chromium.org>
diff --git a/src/gn/ninja_action_target_writer.cc b/src/gn/ninja_action_target_writer.cc index 842eb17..bb78254 100644 --- a/src/gn/ninja_action_target_writer.cc +++ b/src/gn/ninja_action_target_writer.cc
@@ -75,7 +75,6 @@ out_ << " depfile = "; WriteDepfile(SourceFile()); out_ << std::endl; - out_ << " deps = gcc" << std::endl; } if (target_->action_values().pool().ptr) { out_ << " pool = "; @@ -207,7 +206,6 @@ out_ << " depfile = "; WriteDepfile(sources[i]); out_ << std::endl; - out_ << " deps = gcc" << std::endl; } if (target_->action_values().pool().ptr) { out_ << " pool = ";
diff --git a/src/gn/ninja_action_target_writer_unittest.cc b/src/gn/ninja_action_target_writer_unittest.cc index 9efebff..d217ab2 100644 --- a/src/gn/ninja_action_target_writer_unittest.cc +++ b/src/gn/ninja_action_target_writer_unittest.cc
@@ -286,12 +286,10 @@ " | obj/foo/bar.inputdeps.stamp\n" " source_name_part = input1\n" " depfile = gen/input1.d\n" - " deps = gcc\n" "build input2.out: __foo_bar___rule ../../foo/input2.txt" " | obj/foo/bar.inputdeps.stamp\n" " source_name_part = input2\n" " depfile = gen/input2.d\n" - " deps = gcc\n" "\n" "build obj/foo/bar.stamp: stamp input1.out input2.out\n"; EXPECT_EQ(expected_linux, out.str());