Dan Albert | 0fbb532 | 2016-10-04 17:49:33 -0700 | [diff] [blame] | 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 | |
Jesse Hall | b9d7b81 | 2019-04-12 16:05:37 -0700 | [diff] [blame] | 15 | // Headers module is in external/vulkan-headers/Android.bp. |
Bob Badour | 3c53823 | 2021-02-12 21:26:48 -0800 | [diff] [blame] | 16 | package { |
| 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 | |
Dan Albert | 0fbb532 | 2016-10-04 17:49:33 -0700 | [diff] [blame] | 25 | ndk_library { |
Dan Willemsen | 219db6c | 2017-04-07 15:48:39 -0700 | [diff] [blame] | 26 | name: "libvulkan", |
Dan Albert | 0fbb532 | 2016-10-04 17:49:33 -0700 | [diff] [blame] | 27 | symbol_file: "libvulkan.map.txt", |
| 28 | first_version: "24", |
Dan Albert | b9c62a6 | 2017-01-05 15:58:50 -0800 | [diff] [blame] | 29 | unversioned_until: "current", |
Dan Albert | 0fbb532 | 2016-10-04 17:49:33 -0700 | [diff] [blame] | 30 | } |
Colin Cross | 7884c19 | 2016-12-05 13:26:22 -0800 | [diff] [blame] | 31 | |
Tom Murphy | ea32184 | 2024-06-14 18:26:58 +0000 | [diff] [blame] | 32 | aconfig_declarations { |
| 33 | name: "libvulkan_flags", |
| 34 | package: "com.android.graphics.libvulkan.flags", |
| 35 | container: "system", |
| 36 | srcs: ["libvulkan_flags.aconfig"], |
| 37 | } |
| 38 | |
| 39 | cc_aconfig_library { |
| 40 | name: "libvulkanflags", |
| 41 | aconfig_declarations: "libvulkan_flags", |
| 42 | } |
| 43 | |
Colin Cross | 7884c19 | 2016-12-05 13:26:22 -0800 | [diff] [blame] | 44 | cc_library_shared { |
| 45 | name: "libvulkan", |
Colin Cross | 0394364 | 2021-04-21 16:47:25 -0700 | [diff] [blame] | 46 | llndk: { |
| 47 | symbol_file: "libvulkan.map.txt", |
| 48 | export_llndk_headers: [ |
Colin Cross | ed0e6e6 | 2021-04-26 17:19:59 -0700 | [diff] [blame] | 49 | "vulkan_headers", |
Colin Cross | 0394364 | 2021-04-21 16:47:25 -0700 | [diff] [blame] | 50 | ], |
| 51 | }, |
Colin Cross | 7884c19 | 2016-12-05 13:26:22 -0800 | [diff] [blame] | 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", |
Colin Cross | 1383d9f | 2019-11-06 13:33:40 -0800 | [diff] [blame] | 62 | "-Wextra", |
Colin Cross | 7884c19 | 2016-12-05 13:26:22 -0800 | [diff] [blame] | 63 | "-Werror", |
| 64 | "-Wno-padded", |
Colin Cross | 1383d9f | 2019-11-06 13:33:40 -0800 | [diff] [blame] | 65 | "-Wno-sign-compare", |
Colin Cross | 7884c19 | 2016-12-05 13:26:22 -0800 | [diff] [blame] | 66 | "-Wno-switch-enum", |
Colin Cross | 1383d9f | 2019-11-06 13:33:40 -0800 | [diff] [blame] | 67 | "-Wno-unused-variable", |
| 68 | "-Wno-unused-function", |
Colin Cross | 7884c19 | 2016-12-05 13:26:22 -0800 | [diff] [blame] | 69 | |
dimitry | a7cc50d | 2018-12-10 17:06:07 +0100 | [diff] [blame] | 70 | // Have clang emit complete debug_info. |
| 71 | "-fstandalone-debug", |
| 72 | |
Colin Cross | 7884c19 | 2016-12-05 13:26:22 -0800 | [diff] [blame] | 73 | //"-DLOG_NDEBUG=0", |
| 74 | ], |
| 75 | |
| 76 | cppflags: [ |
Colin Cross | 7884c19 | 2016-12-05 13:26:22 -0800 | [diff] [blame] | 77 | "-Wno-c99-extensions", |
| 78 | "-Wno-c++98-compat-pedantic", |
| 79 | "-Wno-exit-time-destructors", |
Dan Stoza | 71bded5 | 2016-10-19 11:10:33 -0700 | [diff] [blame] | 80 | "-Wno-float-equal", |
Colin Cross | 7884c19 | 2016-12-05 13:26:22 -0800 | [diff] [blame] | 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", |
Colin Cross | 7884c19 | 2016-12-05 13:26:22 -0800 | [diff] [blame] | 94 | ], |
| 95 | |
Stephen Kiazyk | e77dce2 | 2017-03-14 15:38:12 -0700 | [diff] [blame] | 96 | header_libs: [ |
Jesse Hall | 408eda0 | 2019-04-12 15:39:16 -0700 | [diff] [blame] | 97 | "hwvulkan_headers", |
Paul Duffin | 0802618 | 2019-09-12 15:01:28 +0100 | [diff] [blame] | 98 | "libnativeloader-headers", |
Colin Cross | 7884c19 | 2016-12-05 13:26:22 -0800 | [diff] [blame] | 99 | "vulkan_headers", |
Sundong Ahn | bc37dd5 | 2020-04-23 21:21:00 +0900 | [diff] [blame] | 100 | "libsurfaceflinger_headers", |
Colin Cross | 7884c19 | 2016-12-05 13:26:22 -0800 | [diff] [blame] | 101 | ], |
Jesse Hall | 408eda0 | 2019-04-12 15:39:16 -0700 | [diff] [blame] | 102 | export_header_lib_headers: ["vulkan_headers"], |
Colin Cross | 7884c19 | 2016-12-05 13:26:22 -0800 | [diff] [blame] | 103 | shared_libs: [ |
Courtney Goeltzenleuchter | 7671d46 | 2018-01-24 11:51:01 -0800 | [diff] [blame] | 104 | "android.hardware.configstore@1.0", |
| 105 | "android.hardware.configstore-utils", |
Jaekyun Seok | d56dec8 | 2016-11-25 16:20:40 +0900 | [diff] [blame] | 106 | "libziparchive", |
Colin Cross | 7884c19 | 2016-12-05 13:26:22 -0800 | [diff] [blame] | 107 | "libhardware", |
| 108 | "libsync", |
| 109 | "libbase", |
Courtney Goeltzenleuchter | 7671d46 | 2018-01-24 11:51:01 -0800 | [diff] [blame] | 110 | "libhidlbase", |
Colin Cross | 7884c19 | 2016-12-05 13:26:22 -0800 | [diff] [blame] | 111 | "liblog", |
Mathias Agopian | 991d254 | 2017-02-06 13:51:32 -0800 | [diff] [blame] | 112 | "libui", |
Jiyong Park | 27c39e1 | 2017-05-08 13:00:02 +0900 | [diff] [blame] | 113 | "libgraphicsenv", |
Colin Cross | 7884c19 | 2016-12-05 13:26:22 -0800 | [diff] [blame] | 114 | "libutils", |
| 115 | "libcutils", |
| 116 | "libz", |
Jiyong Park | 2d81f3c | 2019-01-29 00:36:19 +0900 | [diff] [blame] | 117 | "libnativebridge_lazy", |
| 118 | "libnativeloader_lazy", |
Brian Anderson | dc96fdf | 2017-03-20 16:54:25 -0700 | [diff] [blame] | 119 | "libnativewindow", |
Yiwei Zhang | 06c66fb | 2020-10-14 08:42:26 -0700 | [diff] [blame] | 120 | "libvndksupport", |
Jooyung Han | 749b0ec | 2023-11-15 13:38:06 +0900 | [diff] [blame] | 121 | "libdl_android", |
Daniel Koch | f25f5bb | 2017-10-05 00:26:58 -0400 | [diff] [blame] | 122 | "android.hardware.graphics.common@1.0", |
Sundong Ahn | bc37dd5 | 2020-04-23 21:21:00 +0900 | [diff] [blame] | 123 | "libSurfaceFlingerProp", |
Colin Cross | 7884c19 | 2016-12-05 13:26:22 -0800 | [diff] [blame] | 124 | ], |
Tom Murphy | ea32184 | 2024-06-14 18:26:58 +0000 | [diff] [blame] | 125 | static_libs: [ |
| 126 | "libgrallocusage", |
| 127 | "libvulkanflags", |
| 128 | ], |
Colin Cross | 7884c19 | 2016-12-05 13:26:22 -0800 | [diff] [blame] | 129 | } |