"-Wcast-align",
"-Wno-unused-parameter",
],
+
cppflags: ["-std=c++14"],
+}
- vendor: true,
+cc_defaults {
+ name: "minigbm_cros_gralloc_defaults",
+
+ defaults: ["minigbm_defaults"],
header_libs: [
"libhardware_headers",
"libsystem_headers",
],
+ 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"],
+
+ vendor: true,
+
shared_libs: [
"libcutils",
"libdrm",
"libsync",
"liblog",
],
-
- static_libs: ["libarect"],
-
- export_static_lib_headers: ["libarect"],
}
cc_defaults {
- name: "minigbm_cros_gralloc_defaults",
-
- defaults: ["minigbm_defaults"],
-
- srcs: [
- "cros_gralloc/cros_gralloc_buffer.cc",
- "cros_gralloc/cros_gralloc_helpers.cc",
- "cros_gralloc/cros_gralloc_driver.cc",
- ]
-}
+ name: "gbm_defaults",
-cc_library_static {
- name: "libminigbm",
defaults: ["minigbm_defaults"],
- shared_libs: ["liblog"],
- static_libs: ["libdrm"],
srcs: [
"gbm.c",
export_include_dirs: ["."],
}
+cc_library {
+ name: "libgbm",
+ defaults: ["gbm_defaults"],
+ host_supported: true,
+
+ target: {
+ host: {
+ // Avoid linking to another host copy of libdrm; this library will cause
+ // binary GPU drivers to be loaded from the host, which might be linked
+ // to a system copy of libdrm, which conflicts with the AOSP one
+ allow_undefined_symbols: true,
+ header_libs: ["libdrm"],
+ },
+ android: {
+ shared_libs: [
+ "libdrm",
+ "liblog"
+ ],
+ },
+ },
+}
+
cc_library_static {
name: "libminigbm_cros_gralloc",
defaults: ["minigbm_cros_gralloc_defaults"],
defaults: ["minigbm_cros_gralloc_defaults"],
cflags: ["-DDRV_MESON"],
srcs: ["cros_gralloc/gralloc0/gralloc0.cc"],
-}
\ No newline at end of file
+}