aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Cross <ccross@android.com>2020-03-27 16:03:00 -0700
committerDavid Dietrich <drdietri@google.com>2020-10-14 20:29:07 +0000
commit0f300e3980e49c748dadd77c12d44364961c115d (patch)
treec098b3e5684dcfd069a7917ff3967c66d2cc5498
parentdeaba6eac3852baf03c5a795832bafe05b26479c (diff)
downloadprotobuf-android11-mainline-os-statsd-release.tar.gz
Match the library layout in the BUILD file by moving most of the protoc sources into libprotoc and leaving only main.cc in aprotoc. Bug: 151768015 Test: m checkbuild Change-Id: I00a6efd1f9865299c03ef84b09adffa46eab7a0f Merged-In: I00a6efd1f9865299c03ef84b09adffa46eab7a0f
-rw-r--r--Android.bp112
1 files changed, 37 insertions, 75 deletions
diff --git a/Android.bp b/Android.bp
index 3d5ac1a00..ed0e49a08 100644
--- a/Android.bp
+++ b/Android.bp
@@ -235,80 +235,6 @@ cc_library {
srcs: [
"src/google/protobuf/compiler/code_generator.cc",
- "src/google/protobuf/compiler/plugin.cc",
- "src/google/protobuf/compiler/plugin.pb.cc",
- ],
-
- local_include_dirs: [
- "config",
- ],
- export_include_dirs: [
- "src",
- "config",
- ],
-
- target: {
- windows: {
- enabled: true,
- // defined by the global cflags, but redefined by protobuf
- cflags: ["-UWIN32_LEAN_AND_MEAN"],
- },
- },
-
- rtti: true,
-}
-
-cc_library_host_static {
- name: "libprotoc-kythe",
- defaults: ["protobuf-cflags-defaults"],
- srcs: [
- "src/google/protobuf/compiler/code_generator.cc",
- "src/google/protobuf/compiler/cpp/cpp_helpers.cc",
- "src/google/protobuf/compiler/cpp/cpp_enum.cc",
- "src/google/protobuf/compiler/cpp/cpp_enum_field.cc",
- "src/google/protobuf/compiler/cpp/cpp_extension.cc",
- "src/google/protobuf/compiler/cpp/cpp_field.cc",
- "src/google/protobuf/compiler/cpp/cpp_file.cc",
- "src/google/protobuf/compiler/cpp/cpp_generator.cc",
- "src/google/protobuf/compiler/cpp/cpp_map_field.cc",
- "src/google/protobuf/compiler/cpp/cpp_message.cc",
- "src/google/protobuf/compiler/cpp/cpp_message_field.cc",
- "src/google/protobuf/compiler/cpp/cpp_padding_optimizer.cc",
- "src/google/protobuf/compiler/cpp/cpp_primitive_field.cc",
- "src/google/protobuf/compiler/cpp/cpp_service.cc",
- "src/google/protobuf/compiler/cpp/cpp_string_field.cc",
- "src/google/protobuf/compiler/plugin.cc",
- "src/google/protobuf/compiler/plugin.pb.cc",
- ],
- local_include_dirs: [
- "src",
- ],
- visibility: ["//external/kythe"],
-}
-
-// Android Protocol buffer compiler, aprotoc (host executable)
-// used by the build systems as $(PROTOC) defined in
-// build/core/config.mk
-// =======================================================
-cc_binary_host {
- name: "aprotoc",
- defaults: ["protobuf-cflags-defaults"],
-
- target: {
- windows: {
- enabled: true,
- // defined by the global cflags, but redefined by protobuf
- cflags: ["-UWIN32_LEAN_AND_MEAN"],
- },
- },
-
- // Statically link libc++ because we copy aprotoc to unbundled projects where
- // libc++.so may not be available.
- stl: "libc++_static",
-
- srcs: [
- "src/google/protobuf/compiler/main.cc",
- "src/google/protobuf/compiler/code_generator.cc",
"src/google/protobuf/compiler/command_line_interface.cc",
"src/google/protobuf/compiler/cpp/cpp_enum.cc",
"src/google/protobuf/compiler/cpp/cpp_enum_field.cc",
@@ -391,9 +317,45 @@ cc_binary_host {
"src/google/protobuf/compiler/zip_writer.cc",
],
- local_include_dirs: [
+ export_include_dirs: [
"android",
"src",
+ "config",
+ ],
+
+ target: {
+ windows: {
+ enabled: true,
+ // defined by the global cflags, but redefined by protobuf
+ cflags: ["-UWIN32_LEAN_AND_MEAN"],
+ },
+ },
+
+ rtti: true,
+}
+
+// Android Protocol buffer compiler, aprotoc (host executable)
+// used by the build systems as $(PROTOC) defined in
+// build/core/config.mk
+// =======================================================
+cc_binary_host {
+ name: "aprotoc",
+ defaults: ["protobuf-cflags-defaults"],
+
+ target: {
+ windows: {
+ enabled: true,
+ // defined by the global cflags, but redefined by protobuf
+ cflags: ["-UWIN32_LEAN_AND_MEAN"],
+ },
+ },
+
+ // Statically link libc++ because we copy aprotoc to unbundled projects where
+ // libc++.so may not be available.
+ stl: "libc++_static",
+
+ srcs: [
+ "src/google/protobuf/compiler/main.cc",
],
static_libs: [