Peiyong Lin | 2da7465 | 2018-11-01 10:34:57 -0700 | [diff] [blame^] | 1 | filegroup { |
| 2 | name: "gpuservice_sources", |
| 3 | srcs: [ |
| 4 | "GpuService.cpp", |
| 5 | ], |
| 6 | } |
| 7 | |
| 8 | filegroup { |
| 9 | name: "gpuservice_binary_sources", |
| 10 | srcs: ["main_gpuservice.cpp"], |
| 11 | } |
| 12 | |
| 13 | cc_defaults { |
| 14 | name: "gpuservice_defaults", |
| 15 | cflags: [ |
| 16 | "-DLOG_TAG=\"GpuService\"", |
| 17 | "-Wall", |
| 18 | "-Werror", |
| 19 | "-Wformat", |
| 20 | "-Wthread-safety", |
| 21 | "-Wunused", |
| 22 | "-Wunreachable-code", |
| 23 | ], |
| 24 | cppflags: ["-std=c++1z"], |
| 25 | srcs: [ |
| 26 | ":gpuservice_sources", |
| 27 | ], |
| 28 | include_dirs: [ |
| 29 | "frameworks/native/vulkan/vkjson", |
| 30 | "frameworks/native/vulkan/include", |
| 31 | ], |
| 32 | shared_libs: [ |
| 33 | "libbinder", |
| 34 | "liblog", |
| 35 | "libutils", |
| 36 | "libvulkan", |
| 37 | ], |
| 38 | static_libs: [ |
| 39 | "libvkjson", |
| 40 | ], |
| 41 | } |
| 42 | |
| 43 | cc_defaults { |
| 44 | name: "gpuservice_production_defaults", |
| 45 | defaults: ["gpuservice_defaults"], |
| 46 | cflags: [ |
| 47 | "-fvisibility=hidden", |
| 48 | "-fwhole-program-vtables", // requires ThinLTO |
| 49 | ], |
| 50 | lto: { |
| 51 | thin: true, |
| 52 | }, |
| 53 | } |
| 54 | |
| 55 | cc_defaults { |
| 56 | name: "gpuservice_binary", |
| 57 | defaults: ["gpuservice_defaults"], |
| 58 | whole_static_libs: [ |
| 59 | "libsigchain", |
| 60 | ], |
| 61 | shared_libs: [ |
| 62 | "libbinder", |
| 63 | "liblog", |
| 64 | "libutils", |
| 65 | ], |
| 66 | ldflags: ["-Wl,--export-dynamic"], |
| 67 | } |
| 68 | |
| 69 | cc_binary { |
| 70 | name: "gpuservice", |
| 71 | defaults: ["gpuservice_binary"], |
| 72 | init_rc: ["gpuservice.rc"], |
| 73 | srcs: [":gpuservice_binary_sources"], |
| 74 | } |