aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlistair Delva <adelva@google.com>2020-08-03 00:41:25 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2020-08-03 00:41:25 +0000
commit53f9f565b08263bc9bc3b43d65f1a19c380d5197 (patch)
treedf88a2dcf78266850400e1e5bd34cd261967246b
parent1d08446a21c49a9c0851e73f58290bc3cfea8f2e (diff)
parent69b3dea22327b2ef20fa89c54ca48a20a5389c7c (diff)
downloadwayland-53f9f565b08263bc9bc3b43d65f1a19c380d5197.tar.gz
Add host shared library target am: 19375e79fe am: 69b3dea223
Original change: https://googleplex-android-review.googlesource.com/c/platform/external/wayland/+/12286435 Change-Id: Iff44440f966b4f069141976299c75347fad10bbc
-rw-r--r--Android.bp39
1 files changed, 31 insertions, 8 deletions
diff --git a/Android.bp b/Android.bp
index 28637e2..1b56820 100644
--- a/Android.bp
+++ b/Android.bp
@@ -63,15 +63,24 @@ cc_binary_host {
generated_headers: ["wayland_version_header"],
}
-// Generate protocol source files used by both client and server
+// Generate protocol source files used by both client and server (static)
genrule {
- name: "wayland_core_protocol_sources",
+ name: "wayland_core_protocol_sources_static",
cmd: "$(location wayland_scanner) private-code < $(in) > $(out)",
srcs: [":wayland_core_protocol"],
out: ["wayland-protocol.c"],
tools: ["wayland_scanner"],
}
+// Generate protocol source files used by both client and server (shared)
+genrule {
+ name: "wayland_core_protocol_sources_shared",
+ cmd: "$(location wayland_scanner) public-code < $(in) > $(out)",
+ srcs: [":wayland_core_protocol"],
+ out: ["wayland-protocol.c"],
+ tools: ["wayland_scanner"],
+}
+
// Generate protocol header files used by the client
genrule {
name: "wayland_core_client_protocol_headers",
@@ -91,10 +100,8 @@ genrule {
}
// Build wayland_client
-cc_library_static {
- name: "libwayland_client",
- vendor_available: true,
- host_supported: true,
+cc_defaults {
+ name: "libwayland_client_defaults",
defaults: ["wayland_defaults"],
srcs: [
"src/connection.c",
@@ -106,7 +113,6 @@ cc_library_static {
"-Wall",
"-Werror",
],
- generated_sources: ["wayland_core_protocol_sources"],
static_libs: ["libffi"],
local_include_dirs: ["src"],
generated_headers: [
@@ -119,6 +125,23 @@ cc_library_static {
"wayland_core_client_protocol_headers",
],
}
+cc_library_static {
+ name: "libwayland_client_static",
+ vendor_available: true,
+ defaults: ["libwayland_client_defaults"],
+ generated_sources: ["wayland_core_protocol_sources_static"],
+}
+cc_library_host_shared {
+ name: "libwayland_client",
+ defaults: ["libwayland_client_defaults"],
+ generated_sources: ["wayland_core_protocol_sources_shared"],
+ target: {
+ linux_glibc_x86: {
+ // libffi broken on x86, see b/162610242
+ enabled: false,
+ },
+ },
+}
// Build wayland_server
cc_library_static {
@@ -138,7 +161,7 @@ cc_library_static {
"-Wall",
"-Werror",
],
- generated_sources: ["wayland_core_protocol_sources"],
+ generated_sources: ["wayland_core_protocol_sources_static"],
static_libs: ["libffi"],
local_include_dirs: ["src"],
generated_headers: [