Commit 3fa50872 authored by Jonathan Metzman's avatar Jonathan Metzman Committed by Commit Bot

[LPM] Fix issue with plugin use for component builds.

Change-Id: Ic4533523c8d1e335a41c0fe3a46f39feea8257c9
Reviewed-on: https://chromium-review.googlesource.com/1146995Reviewed-by: default avatarMartin Barbella <mbarbella@chromium.org>
Commit-Queue: Jonathan Metzman <metzman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#577231}
parent 6c86f168
......@@ -19,9 +19,19 @@ template("fuzzable_proto_library") {
generate_python = false
}
# Use a component for the build target with target_name. That way we can
# also force dependencies to build using protobuf_full.
component(target_name) {
# Inspired by proto_library.gni's handling of
# component_build_force_source_set.
if (defined(component_build_force_source_set) &&
component_build_force_source_set && is_component_build) {
link_target_type = "source_set"
} else {
link_target_type = "static_library"
}
# Use a static_library for the build target with target_name or
# source_set. That way we can also force dependencies to build using
# protobuf_full.
target(link_target_type, target_name) {
public_deps = [
":proto_library_" + target_name,
"//third_party/libprotobuf-mutator:protobuf_full",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment