GN: Don't write stamp files for one rule.

When handling input deps, GN would previously always write a stamp file, even
if that stamp file just stamped one input file. This is a wasteful extra rule.

The previous code was also a bit fragile because it first computed if there
was any output via a 6-line conditional, and then wrote that output in a way
that the conditions must match the previous computation.

This new structure is a little more clear since we accumulate the inputs
and then check the size, so nothing must be kept in sync.

Savings in Chrome Linux build is a reduction in 388 build rules and 376K of
.ninja files.

BUG=552701

Review URL: https://codereview.chromium.org/1663813003

Cr-Original-Commit-Position: refs/heads/master@{#373375}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 4445f6179019a0a62cd4a7854723dba7316c5ac0
5 files changed
tree: 69bd63c098e1d1d5163054bad90d98200dacc22c
  1. tools/