• Eric Seckler's avatar
    protobuf: Allow disabling public_config propagation in gn targets · 42740715
    Eric Seckler authored
    When depending on multiple similar proto_library targets, each target
    can create its own public_config. In the case of perfetto, this adds up
    to about a dozen configs, each adding the exact same include path.
    
    Because gn doesn't eliminate duplicate include paths (crbug.com/gn/142),
    these configs end up adding duplicate -I command line flags to build
    commands. On some bots, this recently caused us to exceed command line
    length limits (see crbug.com/1043279).
    
    This patch adds an invoker argument to the proto_library gn template,
    which disables the public_config propgation of the proto_library target
    and will allow perfetto to define and propagate a separate
    public_config instead to avoid this duplication.
    
    Bug: 1043279, gn:142
    Change-Id: Ifa68c164b2b4c631bdaf98f63ba5bf7537e8e166
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2010860
    Commit-Queue: Eric Seckler <eseckler@chromium.org>
    Reviewed-by: default avatarSami Kyöstilä <skyostil@chromium.org>
    Reviewed-by: default avatarTommy Nyquist <nyquist@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#734043}
    42740715
proto_library.gni 16.9 KB