X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=Android.bp;h=d074e46dfd9204b4a609e6857b2efb9a6330b95a;hb=bdeb2ac4f4f5c937ea8215b4dc80e26995116432;hp=02e8e5de0f1177bc1a83522b4d5ab43aeb929750;hpb=0709f569be703a7a95448329a19082d7736decfe;p=android-x86%2Fexternal-minigbm.git diff --git a/Android.bp b/Android.bp index 02e8e5d..d074e46 100644 --- a/Android.bp +++ b/Android.bp @@ -36,9 +36,14 @@ cc_defaults { "-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", @@ -54,6 +59,18 @@ cc_defaults { "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", @@ -61,29 +78,12 @@ cc_defaults { "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", @@ -93,6 +93,28 @@ cc_library_static { 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"], @@ -129,4 +151,4 @@ cc_library_shared { defaults: ["minigbm_cros_gralloc_defaults"], cflags: ["-DDRV_MESON"], srcs: ["cros_gralloc/gralloc0/gralloc0.cc"], -} \ No newline at end of file +}