[build] Make license rules conditional on is_fuchsia_tree
Wrap import("//build/licenses/license.gni"), license targets, and
applicable_licenses in if (defined(is_fuchsia_tree) && is_fuchsia_tree)
checks. This allows sharing BUILD.gn and BUILD.input.gn cleanly between
the Fuchsia platform build tree and out-of-tree standalone consumers
such as Cobalt.
Additionally, remove the unused import of proto_library.gni.
TAG: agy
CONV: 90202eb4-61f5-41b3-b833-bd1359a46a91
Change-Id: I2c6d54d46c41ee1a03076e87d7bff406dd1d063f
Reviewed-on: https://fuchsia-review.googlesource.com/c/protobuf-gn/+/1699754
Reviewed-by: Thomas Gales <tgales@google.com>
This repository contains GN build system support for Protocol Buffers. It's in its own repository because it needs to be shared by Fuchsia and Cobalt.
This repo should be checked out such that:
//build/secondary/third_party/protobuf.//third_party/protobuf/src.//.gn contains secondary_source = "//build/secondary/"See the GN documentation on secondary_source.
WARNING: DO NOT MODIFY THE BUILD.gn FILE DIRECTLY!
The BUILD.gn file in this directory is generated automatically. Any manual changes will be overwritten.
To make changes to the build configuration:
BUILD.input.gn file to suit your needs, for example managing visibility, suppressing warnings, etc.gen.py script located in this directory to regenerate the BUILD.gn file:./gen.py [commit_hash]If no commit hash is specified, it defaults to
HEAD of //third_party/protobuf/src.BUILD.input.gn and the newly generated BUILD.gn file.Failing to modify BUILD.input.gn will result in your changes being lost the next time the build file is regenerated.