OSDN Git Service

Add host build of libgbm.so for crosvm
authorAlistair Delva <adelva@google.com>
Tue, 21 Jul 2020 19:04:48 +0000 (12:04 -0700)
committerAlistair Delva <adelva@google.com>
Sun, 26 Jul 2020 23:32:14 +0000 (16:32 -0700)
Build minigbm for the host.

Bug: 161831173
Change-Id: I30699c38f958ee03a1b3f8495ecc42e9779f8332

Android.bp

index 02e8e5d..b853e58 100644 (file)
@@ -36,9 +36,18 @@ cc_defaults {
         "-Wcast-align",
         "-Wno-unused-parameter",
     ],
+
     cppflags: ["-std=c++14"],
 
-    vendor: true,
+    shared_libs: [
+        "libdrm",
+    ],
+}
+
+cc_defaults {
+    name: "minigbm_cros_gralloc_defaults",
+
+    defaults: ["minigbm_defaults"],
 
     header_libs: [
         "libhardware_headers",
@@ -54,35 +63,29 @@ cc_defaults {
         "libsystem_headers",
     ],
 
-    shared_libs: [
-        "libcutils",
-        "libdrm",
-        "libnativewindow",
-        "libsync",
-        "liblog",
+    srcs: [
+        "cros_gralloc/cros_gralloc_buffer.cc",
+        "cros_gralloc/cros_gralloc_helpers.cc",
+        "cros_gralloc/cros_gralloc_driver.cc",
     ],
 
     static_libs: ["libarect"],
 
     export_static_lib_headers: ["libarect"],
-}
-
-cc_defaults {
-    name: "minigbm_cros_gralloc_defaults",
 
-    defaults: ["minigbm_defaults"],
+    vendor: true,
 
-    srcs: [
-        "cros_gralloc/cros_gralloc_buffer.cc",
-        "cros_gralloc/cros_gralloc_helpers.cc",
-        "cros_gralloc/cros_gralloc_driver.cc",
-    ]
+    shared_libs: [
+        "libcutils",
+        "libnativewindow",
+        "libsync",
+        "liblog",
+    ],
 }
 
-cc_library_static {
-    name: "libminigbm",
+cc_library_host_shared {
+    name: "libgbm",
     defaults: ["minigbm_defaults"],
-    shared_libs: ["liblog"],
     static_libs: ["libdrm"],
 
     srcs: [
@@ -129,4 +132,4 @@ cc_library_shared {
     defaults: ["minigbm_cros_gralloc_defaults"],
     cflags: ["-DDRV_MESON"],
     srcs: ["cros_gralloc/gralloc0/gralloc0.cc"],
-}
\ No newline at end of file
+}