1// Copyright (C) 2016 The Android Open Source Project 2// 3// Licensed under the Apache License, Version 2.0 (the "License"); 4// you may not use this file except in compliance with the License. 5// You may obtain a copy of the License at 6// 7// http://www.apache.org/licenses/LICENSE-2.0 8// 9// Unless required by applicable law or agreed to in writing, software 10// distributed under the License is distributed on an "AS IS" BASIS, 11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12// See the License for the specific language governing permissions and 13// limitations under the License. 14 15// Headers module is in external/vulkan-headers/Android.bp. 16package { 17 // See: http://go/android-license-faq 18 // A large-scale-change added 'default_applicable_licenses' to import 19 // all of the 'license_kinds' from "frameworks_native_license" 20 // to get the below license kinds: 21 // SPDX-license-identifier-Apache-2.0 22 default_applicable_licenses: ["frameworks_native_license"], 23} 24 25ndk_library { 26 name: "libvulkan", 27 symbol_file: "libvulkan.map.txt", 28 first_version: "24", 29 unversioned_until: "current", 30 export_header_libs: [ 31 "ndk_vulkan_headers", 32 ], 33} 34 35cc_library_shared { 36 name: "libvulkan", 37 llndk: { 38 symbol_file: "libvulkan.map.txt", 39 export_llndk_headers: [ 40 "vulkan_headers", 41 ], 42 }, 43 sanitize: { 44 misc_undefined: ["integer"], 45 }, 46 47 cflags: [ 48 "-DLOG_TAG=\"vulkan\"", 49 "-DVK_USE_PLATFORM_ANDROID_KHR", 50 "-DVK_NO_PROTOTYPES", 51 "-fvisibility=hidden", 52 "-fstrict-aliasing", 53 "-Wextra", 54 "-Werror", 55 "-Wno-padded", 56 "-Wno-sign-compare", 57 "-Wno-switch-enum", 58 "-Wno-unused-variable", 59 "-Wno-unused-function", 60 61 // Have clang emit complete debug_info. 62 "-fstandalone-debug", 63 64 //"-DLOG_NDEBUG=0", 65 ], 66 67 cppflags: [ 68 "-Wno-c99-extensions", 69 "-Wno-c++98-compat-pedantic", 70 "-Wno-exit-time-destructors", 71 "-Wno-float-equal", 72 "-Wno-global-constructors", 73 "-Wno-zero-length-array", 74 ], 75 76 srcs: [ 77 "api.cpp", 78 "api_gen.cpp", 79 "debug_report.cpp", 80 "driver.cpp", 81 "driver_gen.cpp", 82 "layers_extensions.cpp", 83 "stubhal.cpp", 84 "swapchain.cpp", 85 ], 86 87 header_libs: [ 88 "hwvulkan_headers", 89 "libnativeloader-headers", 90 "vulkan_headers", 91 "libsurfaceflinger_headers", 92 ], 93 export_header_lib_headers: ["vulkan_headers"], 94 shared_libs: [ 95 "android.hardware.configstore@1.0", 96 "android.hardware.configstore-utils", 97 "libziparchive", 98 "libhardware", 99 "libsync", 100 "libbase", 101 "libhidlbase", 102 "liblog", 103 "libui", 104 "libgraphicsenv", 105 "libutils", 106 "libcutils", 107 "libz", 108 "libnativebridge_lazy", 109 "libnativeloader_lazy", 110 "libnativewindow", 111 "libvndksupport", 112 "libdl_android", 113 "android.hardware.graphics.common@1.0", 114 "libSurfaceFlingerProp", 115 ], 116 static_libs: ["libgrallocusage"], 117} 118