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} 31 32aconfig_declarations { 33 name: "libvulkan_flags", 34 package: "com.android.graphics.libvulkan.flags", 35 container: "system", 36 srcs: ["libvulkan_flags.aconfig"], 37} 38 39cc_aconfig_library { 40 name: "libvulkanflags", 41 aconfig_declarations: "libvulkan_flags", 42} 43 44cc_library_shared { 45 name: "libvulkan", 46 llndk: { 47 symbol_file: "libvulkan.map.txt", 48 export_llndk_headers: [ 49 "vulkan_headers", 50 ], 51 }, 52 sanitize: { 53 misc_undefined: ["integer"], 54 }, 55 56 cflags: [ 57 "-DLOG_TAG=\"vulkan\"", 58 "-DVK_USE_PLATFORM_ANDROID_KHR", 59 "-DVK_NO_PROTOTYPES", 60 "-fvisibility=hidden", 61 "-fstrict-aliasing", 62 "-Wextra", 63 "-Werror", 64 "-Wno-padded", 65 "-Wno-sign-compare", 66 "-Wno-switch-enum", 67 "-Wno-unused-variable", 68 "-Wno-unused-function", 69 70 // Have clang emit complete debug_info. 71 "-fstandalone-debug", 72 73 //"-DLOG_NDEBUG=0", 74 ], 75 76 cppflags: [ 77 "-Wno-c99-extensions", 78 "-Wno-c++98-compat-pedantic", 79 "-Wno-exit-time-destructors", 80 "-Wno-float-equal", 81 "-Wno-global-constructors", 82 "-Wno-zero-length-array", 83 ], 84 85 srcs: [ 86 "api.cpp", 87 "api_gen.cpp", 88 "debug_report.cpp", 89 "driver.cpp", 90 "driver_gen.cpp", 91 "layers_extensions.cpp", 92 "stubhal.cpp", 93 "swapchain.cpp", 94 ], 95 96 header_libs: [ 97 "hwvulkan_headers", 98 "libnativeloader-headers", 99 "vulkan_headers", 100 "libsurfaceflinger_headers", 101 ], 102 export_header_lib_headers: ["vulkan_headers"], 103 shared_libs: [ 104 "[email protected]", 105 "android.hardware.configstore-utils", 106 "libziparchive", 107 "libhardware", 108 "libsync", 109 "libbase", 110 "libhidlbase", 111 "liblog", 112 "libui", 113 "libgraphicsenv", 114 "libutils", 115 "libcutils", 116 "libz", 117 "libnativebridge_lazy", 118 "libnativeloader_lazy", 119 "libnativewindow", 120 "libvndksupport", 121 "libdl_android", 122 "[email protected]", 123 "libSurfaceFlingerProp", 124 ], 125 static_libs: [ 126 "libgrallocusage", 127 "libvulkanflags", 128 ], 129} 130