Reduce rebuild cost of VERSION changes

Touching VERSION elicits a regeneration of all mojom message IDs on
platforms where message ID scrambling is enabled.

Before this CL, that regeneration step induces a rebuild of over
13000 targets when building chrome, as all mojom headers are
regenerated, and dependencies on mojom headers abound.

After this CL, the regeneration step only forces a rebuild of
a new per-mojom header dedicated exclusively to message ID
definitions, affecting only the corresponding mojom.cc files
and reducing the rebuild cost to about 2700 targets.

This also introduces a new GN arg |enable_mojom_message_id_scrambling|
which defaults to |true|, enabling the current scrambling behavior on
all supported platforms. If set to |false|, message IDs will never
be scrambled and changes to VERSION won't affect mojom in any way.

Bug: 808162
Change-Id: I8c4e4fa1dcc8d1d4349febee7dea6cce824ca0a6
Reviewed-on: https://chromium-review.googlesource.com/900528
Reviewed-by: Jay Civelli <jcivelli@chromium.org>
Commit-Queue: Ken Rockot <rockot@chromium.org>
Cr-Commit-Position: refs/heads/master@{#537446}

CrOS-Libchrome-Original-Commit: 2cdc649c230ae5c9edac93db2d9243a2f8bbe6b6
8 files changed
tree: 5a9f733d2be597bed4f5dca80a99482a16853a57
  1. base/
  2. build/
  3. components/
  4. dbus/
  5. device/
  6. ipc/
  7. mojo/
  8. testing/
  9. third_party/
  10. ui/