| /* |
| * Copyright (C) 2023 The Android Open Source Project |
| * |
| * Licensed under the Apache License, Version 2.0 (the "License"); |
| * you may not use this file except in compliance with the License. |
| * You may obtain a copy of the License at |
| * |
| * http://www.apache.org/licenses/LICENSE-2.0 |
| * |
| * Unless required by applicable law or agreed to in writing, software |
| * distributed under the License is distributed on an "AS IS" BASIS, |
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| * See the License for the specific language governing permissions and |
| * limitations under the License. |
| */ |
| |
| package { |
| // See: http://go/android-license-faq |
| default_applicable_licenses: ["external_mesa3d_license"], |
| } |
| |
| cc_library_shared { |
| name: "vulkan.ranchu", |
| defaults: [ |
| "mesa_gfxstream_guest_cc_defaults", |
| "mesa_common_defaults", |
| "mesa_platform_virtgpu_defaults", |
| ], |
| generated_headers: [ |
| "vk_cmd_queue_header", |
| "vk_physical_device_features_header", |
| "vk_physical_device_properties_header", |
| "spirv_info_header", |
| ], |
| header_libs: [ |
| "mesa_compiler_headers", |
| "mesa_common_headers", |
| "libnativewindow_headers", |
| "mesa_vulkan_enc_headers", |
| "mesa_gfxstream_aemu_headers", |
| ], |
| static_libs: [ |
| "mesa_compiler", |
| "mesa_util_c11", |
| "mesa_vulkan_util", |
| "mesa_vulkan_runtime", |
| "mesa_vulkan_wsi", |
| "mesa_gfxstream_vulkan_entrypoints", |
| "mesa_util", |
| "mesa_util_format", |
| "mesa_goldfish_address_space", |
| "libringbuffer", |
| "libqemupipe.ranchu", |
| "libarect", |
| "mesa_gfxstream_aemu", |
| "mesa_gfxstream_guest_android", |
| "mesa_gfxstream_connection_manager", |
| "libgfxstream_rcEnc_static", |
| "libgfxstream_androidemu_static", |
| ], |
| shared_libs: [ |
| "liblog", |
| "libcutils", |
| "libbase", |
| "libdrm", |
| "libOpenglCodecCommon", |
| ], |
| cflags: [ |
| "-DLOG_TAG=\"goldfish_vulkan\"", |
| "-DVK_NO_PROTOTYPES", |
| "-fstrict-aliasing", |
| "-fvisibility=hidden", |
| "-Wno-missing-field-initializers", |
| "-Wno-unused-function", |
| "-Wno-unused-parameter", |
| "-Wno-cast-calling-convention", |
| ], |
| ldflags: [ |
| // Mesa always adds Bsymbolic when available (see 'ld_args_bsymbolic' in Meson build). Duplicate that |
| // behavior here. '--gc-sections' has stronger justification: this lets drivers drop |
| // shared code unused by that specific driver (particularly relevant for Vulkan drivers). |
| "-Wl,-Bsymbolic", |
| "-Wl,--gc-sections", |
| ], |
| srcs: [ |
| "gfxstream_vk_device.cpp", |
| "gfxstream_vk_cmd.cpp", |
| "gfxstream_vk_wsi.cpp", |
| ":mesa_vulkan_enc_impl", |
| ], |
| target: { |
| android: { |
| relative_install_path: "hw", |
| static_libs: [ |
| "mesa_u_gralloc", |
| ], |
| header_libs: [ |
| "hwvulkan_headers", |
| "libnativebase_headers", |
| ], |
| shared_libs: [ |
| "libsync", |
| "libhardware", |
| "libnativewindow", |
| "libhidlbase", |
| "libutils", |
| ], |
| srcs: [ |
| "gfxstream_vk_android.cpp", |
| ], |
| }, |
| host: { |
| cflags: [ |
| "-DEND2END_TESTS", |
| ], |
| }, |
| }, |
| } |