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

Commit 5de3ce61 authored by Yiwei Zhang's avatar Yiwei Zhang
Browse files

Restructure blueprint file for gpuservice and vkjson

1. Get gpuservice ready for testing.
2. Remove libvulkan from gpuservice deps which also requires the correct
   vkjson platform support.

Bug: 141392969
Test: build, flash and boot
Change-Id: Id6a242d32df091785c5411622f82218941900c7a
parent 042d728d
Loading
Loading
Loading
Loading
+42 −26
Original line number Diff line number Diff line
filegroup {
    name: "gpuservice_sources",
    srcs: [
        "GpuService.cpp",
        "gpustats/GpuStats.cpp"
    ],
}

filegroup {
    name: "gpuservice_binary_sources",
    srcs: ["main_gpuservice.cpp"],
}

cc_defaults {
    name: "gpuservice_defaults",
    cflags: [
        "-DLOG_TAG=\"GpuService\"",
        "-Wall",
        "-Werror",
        "-Wformat",
@@ -22,12 +8,13 @@ cc_defaults {
        "-Wunused",
        "-Wunreachable-code",
    ],
    srcs: [
        ":gpuservice_sources",
    ],
    include_dirs: [
        "frameworks/native/vulkan/vkjson",
        "frameworks/native/vulkan/include",
}

cc_defaults {
    name: "libgpuservice_defaults",
    defaults: ["gpuservice_defaults"],
    cflags: [
        "-DLOG_TAG=\"GpuService\"",
    ],
    shared_libs: [
        "libbase",
@@ -36,17 +23,22 @@ cc_defaults {
        "libgraphicsenv",
        "liblog",
        "libutils",
        "libvulkan",
        "libvkjson",
    ],
    static_libs: [
        "libserviceutils",
        "libvkjson",
    ],
    export_static_lib_headers: [
        "libserviceutils",
    ],
    export_shared_lib_headers: [
        "libgraphicsenv",
    ],
}

cc_defaults {
    name: "gpuservice_production_defaults",
    defaults: ["gpuservice_defaults"],
    name: "libgpuservice_production_defaults",
    defaults: ["libgpuservice_defaults"],
    cflags: [
        "-fvisibility=hidden",
        "-fwhole-program-vtables", // requires ThinLTO
@@ -56,8 +48,24 @@ cc_defaults {
    },
}

filegroup {
    name: "libgpuservice_sources",
    srcs: [
        "GpuService.cpp",
        "gpustats/GpuStats.cpp"
    ],
}

cc_library_shared {
    name: "libgpuservice",
    defaults: ["libgpuservice_production_defaults"],
    srcs: [
        ":libgpuservice_sources",
    ],
}

cc_defaults {
    name: "gpuservice_binary",
    name: "libgpuservice_binary",
    defaults: ["gpuservice_defaults"],
    shared_libs: [
        "libbinder",
@@ -68,9 +76,17 @@ cc_defaults {
    ldflags: ["-Wl,--export-dynamic"],
}

filegroup {
    name: "gpuservice_binary_sources",
    srcs: ["main_gpuservice.cpp"],
}

cc_binary {
    name: "gpuservice",
    defaults: ["gpuservice_binary"],
    defaults: ["libgpuservice_binary"],
    init_rc: ["gpuservice.rc"],
    srcs: [":gpuservice_binary_sources"],
    shared_libs: [
        "libgpuservice",
    ],
}
+6 −3
Original line number Diff line number Diff line
cc_library_static {
cc_library_shared {
    name: "libvkjson",
    srcs: [
        "vkjson.cc",
@@ -15,11 +15,14 @@ cc_library_static {
    export_include_dirs: [
        ".",
    ],
    shared_libs: [
        "libvulkan",
    ],
    whole_static_libs: [
        "libjsoncpp",
    ],
    header_libs: [
        "vulkan_headers",
    export_shared_lib_headers: [
        "libvulkan",
    ],
}