android_external_minigbm/Android.bp
Jiyong Park a5864eb6c7 add crosvm to com.android.virt
To do so, crosvm and its dependencies have the apex_available property
set to "//apex_available:platform", "com.android.virt" to explicitly
acknowledge the joining.

Bug: 174639241
Test: m com.android.virt
Change-Id: I11f02fea20b81f070ce5fb245eebb70421bb4e0b
2020-12-14 16:03:39 +09:00

152 lines
3.2 KiB
Text

// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
cc_defaults {
name: "minigbm_defaults",
srcs: [
"amdgpu.c",
"drv.c",
"dumb_driver.c",
"exynos.c",
"helpers_array.c",
"helpers.c",
"i915.c",
"mediatek.c",
"msm.c",
"rockchip.c",
"tegra.c",
"vc4.c",
"virtio_gpu.c",
],
cflags: [
"-D_GNU_SOURCE=1",
"-D_FILE_OFFSET_BITS=64",
"-Wall",
"-Wsign-compare",
"-Wpointer-arith",
"-Wcast-qual",
"-Wcast-align",
"-Wno-unused-parameter",
],
cppflags: ["-std=c++14"],
}
cc_defaults {
name: "minigbm_cros_gralloc_defaults",
defaults: ["minigbm_defaults"],
header_libs: [
"libhardware_headers",
"libnativebase_headers",
"libnativewindow_headers",
"libsystem_headers",
],
export_header_lib_headers: [
"libhardware_headers",
"libnativebase_headers",
"libnativewindow_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",
"libnativewindow",
"libsync",
"liblog",
],
}
cc_defaults {
name: "gbm_defaults",
defaults: ["minigbm_defaults"],
srcs: [
"gbm.c",
"gbm_helpers.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_headers"],
},
android: {
shared_libs: [
"libdrm",
"liblog"
],
},
},
apex_available: [
"//apex_available:platform",
"com.android.virt",
],
}
cc_library_static {
name: "libminigbm_cros_gralloc",
defaults: ["minigbm_cros_gralloc_defaults"],
shared_libs: ["liblog"],
static_libs: ["libdrm"],
export_include_dirs: ["."],
}
cc_library_shared {
name: "gralloc.minigbm",
defaults: ["minigbm_cros_gralloc_defaults"],
srcs: ["cros_gralloc/gralloc0/gralloc0.cc"],
}
cc_library_shared {
name: "gralloc.minigbm_intel",
defaults: ["minigbm_cros_gralloc_defaults"],
enabled: false,
arch: {
x86: {
enabled: true,
},
x86_64: {
enabled: true,
},
},
cflags: ["-DDRV_I915"],
srcs: ["cros_gralloc/gralloc0/gralloc0.cc"],
}
cc_library_shared {
name: "gralloc.minigbm_meson",
defaults: ["minigbm_cros_gralloc_defaults"],
cflags: ["-DDRV_MESON"],
srcs: ["cros_gralloc/gralloc0/gralloc0.cc"],
}