Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1ca4674b authored by Steven Thomas's avatar Steven Thomas Committed by Android (Google) Code Review
Browse files

Merge "Make libdvr a shared library" into oc-dev

parents 2520d44e 3be0aa66
Loading
Loading
Loading
Loading
+58 −36
Original line number Diff line number Diff line
@@ -19,20 +19,11 @@ cc_library_headers {
    export_include_dirs: ["include"],
}

cc_library_static {
    name: "libdvr",
    owner: "google",

    cflags: [
        "-fvisibility=hidden",
cflags = [
    "-DLOG_TAG=\"libdvr\"",
        "-DDVR_EXPORT=__attribute__((visibility(\"default\")))",
    ],

    header_libs: ["libdvr_headers"],
    export_header_lib_headers: ["libdvr_headers"],
]

    srcs: [
srcs = [
    "dvr_api.cpp",
    "dvr_buffer.cpp",
    "dvr_buffer_queue.cpp",
@@ -40,9 +31,9 @@ cc_library_static {
    "dvr_hardware_composer_client.cpp",
    "dvr_surface.cpp",
    "dvr_vsync.cpp",
    ],
]

    static_libs: [
static_libs = [
    "libbufferhub",
    "libbufferhubqueue",
    "libdisplay",
@@ -51,15 +42,46 @@ cc_library_static {
    "libvr_hwc-impl",
    "libvr_hwc-binder",
    "libgrallocusage",
    ],
    "libpdx_default_transport",
]

    shared_libs: [
shared_libs = [
    "android.hardware.graphics.bufferqueue@1.0",
    "android.hidl.token@1.0-utils",
    "libbase",
    "libbinder",
    "liblog",
    "libcutils",
    "libutils",
    "libnativewindow",
    ],
    "libgui",
    "libui",
]

cc_library_shared {
    name: "libdvr",
    owner: "google",
    cflags: cflags,
    header_libs: ["libdvr_headers"],
    export_header_lib_headers: ["libdvr_headers"],
    srcs: srcs,
    static_libs: static_libs,
    shared_libs: shared_libs,
    version_script: "exported_apis.lds",
}

// Also build a static libdvr for linking into tests. The linker script
// restricting function access in the shared lib makes it inconvenient to use in
// test code.
cc_library_static {
    name: "libdvr_static",
    owner: "google",
    cflags: cflags,
    header_libs: ["libdvr_headers"],
    export_header_lib_headers: ["libdvr_headers"],
    srcs: srcs,
    static_libs: static_libs,
    shared_libs: shared_libs,
}

subdirs = [
+1 −1
Original line number Diff line number Diff line
@@ -18,7 +18,7 @@

extern "C" {

DVR_EXPORT int dvrGetApi(void* api, size_t struct_size, int version) {
int dvrGetApi(void* api, size_t struct_size, int version) {
  ALOGI("dvrGetApi: api=%p struct_size=%zu version=%d", api, struct_size,
        version);
  if (version == 1) {
+9 −0
Original line number Diff line number Diff line
{
  global:
    # Whitelist the function to load the dvr api.
    dvrGetApi;

  local:
    # Hide everything else.
    *;
};
+1 −1
Original line number Diff line number Diff line
@@ -25,7 +25,7 @@ shared_libraries = [
]

static_libraries = [
    "libdvr",
    "libdvr_static",
    "libbufferhubqueue",
    "libbufferhub",
    "libchrome",