From e0ed9db1d24ad7df27146f37895563f8ebc4d613 Mon Sep 17 00:00:00 2001 From: Amr Aboelkher Date: Wed, 2 Oct 2019 18:08:08 +0200 Subject: [PATCH 02/11] common-mk: Add proto library and its dependencies for policy common definitions BUG=chromium:1009436,chromium:1006077,chromium:552439 TEST=precq passes Cq-Depend: chromium:1833618 Change-Id: I12e2f15afba615cd4395eb5818f6ff370d187c73 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform2/+/1835953 Tested-by: Amr Aboelkher Legacy-Commit-Queue: Commit Bot Reviewed-by: Mike Frysinger --- common-mk/external_dependencies/BUILD.gn | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/common-mk/external_dependencies/BUILD.gn b/common-mk/external_dependencies/BUILD.gn index 4ec1665e3..61f571b38 100644 --- a/common-mk/external_dependencies/BUILD.gn +++ b/common-mk/external_dependencies/BUILD.gn @@ -65,14 +65,30 @@ action("cloud_policy_proto_generator") { ] } +proto_library("policy_common_definitions-protos") { + proto_in_dir = "${sysroot}/usr/share/protofiles" + proto_out_dir = "include/bindings" + sources = [ + "${proto_in_dir}/policy_common_definitions.proto", + ] + + # policy-protos.a is used by a shared_libary object: https://crbug.com/715795 + # Build it with '-fPIC' instead of '-fPIE'. + configs = [ "//common-mk:pic" ] +} + proto_library("policy-protos") { proto_in_dir = "${sysroot}/usr/share/protofiles" proto_out_dir = "include/bindings" + proto_lib_dirs = [ "${sysroot}/usr/share/protofiles" ] sources = [ "${proto_in_dir}/chrome_device_policy.proto", "${proto_in_dir}/chrome_extension_policy.proto", "${proto_in_dir}/device_management_backend.proto", ] + public_deps = [ + ":policy_common_definitions-protos", + ] # policy-protos.a is used by a shared_libary object: https://crbug.com/715795 # Build it with '-fPIC' instead of '-fPIE'. @@ -88,18 +104,23 @@ goproto_library("policy-goprotos") { "${proto_in_dir}/chrome_device_policy.proto", "${proto_in_dir}/chrome_extension_policy.proto", "${proto_in_dir}/device_management_backend.proto", + "${proto_in_dir}/policy_common_definitions.proto", ] } proto_library("user_policy-protos") { proto_in_dir = "${target_gen_dir}/proto" proto_out_dir = "include/bindings" + proto_lib_dirs = [ "${sysroot}/usr/share/protofiles" ] sources = [ "${proto_in_dir}/cloud_policy.proto", ] deps = [ ":cloud_policy_proto_generator", ] + public_deps = [ + ":policy_common_definitions-protos", + ] } proto_library("install_attributes-proto") { -- 2.23.0