blob: 4c4e3417a33b6c96d99a190b0e70cc02d4a75b45 [file] [log] [blame]
Dan Albert0fbb5322016-10-04 17:49:33 -07001// 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 Hallb9d7b812019-04-12 16:05:37 -070015// Headers module is in external/vulkan-headers/Android.bp.
Bob Badour3c538232021-02-12 21:26:48 -080016package {
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 Albert0fbb5322016-10-04 17:49:33 -070025ndk_library {
Dan Willemsen219db6c2017-04-07 15:48:39 -070026 name: "libvulkan",
Dan Albert0fbb5322016-10-04 17:49:33 -070027 symbol_file: "libvulkan.map.txt",
28 first_version: "24",
Dan Albertb9c62a62017-01-05 15:58:50 -080029 unversioned_until: "current",
Spandan Dasd59d1b92022-09-08 21:52:22 +000030 export_header_libs: [
31 "ndk_vulkan_headers",
32 ],
Dan Albert0fbb5322016-10-04 17:49:33 -070033}
Colin Cross7884c192016-12-05 13:26:22 -080034
Tom Murphyea321842024-06-14 18:26:58 +000035aconfig_declarations {
36 name: "libvulkan_flags",
37 package: "com.android.graphics.libvulkan.flags",
38 container: "system",
39 srcs: ["libvulkan_flags.aconfig"],
40}
41
42cc_aconfig_library {
43 name: "libvulkanflags",
44 aconfig_declarations: "libvulkan_flags",
45}
46
Colin Cross7884c192016-12-05 13:26:22 -080047cc_library_shared {
48 name: "libvulkan",
Colin Cross03943642021-04-21 16:47:25 -070049 llndk: {
50 symbol_file: "libvulkan.map.txt",
51 export_llndk_headers: [
Colin Crossed0e6e62021-04-26 17:19:59 -070052 "vulkan_headers",
Colin Cross03943642021-04-21 16:47:25 -070053 ],
54 },
Colin Cross7884c192016-12-05 13:26:22 -080055 sanitize: {
56 misc_undefined: ["integer"],
57 },
58
59 cflags: [
60 "-DLOG_TAG=\"vulkan\"",
61 "-DVK_USE_PLATFORM_ANDROID_KHR",
62 "-DVK_NO_PROTOTYPES",
63 "-fvisibility=hidden",
64 "-fstrict-aliasing",
Colin Cross1383d9f2019-11-06 13:33:40 -080065 "-Wextra",
Colin Cross7884c192016-12-05 13:26:22 -080066 "-Werror",
67 "-Wno-padded",
Colin Cross1383d9f2019-11-06 13:33:40 -080068 "-Wno-sign-compare",
Colin Cross7884c192016-12-05 13:26:22 -080069 "-Wno-switch-enum",
Colin Cross1383d9f2019-11-06 13:33:40 -080070 "-Wno-unused-variable",
71 "-Wno-unused-function",
Colin Cross7884c192016-12-05 13:26:22 -080072
dimitrya7cc50d2018-12-10 17:06:07 +010073 // Have clang emit complete debug_info.
74 "-fstandalone-debug",
75
Colin Cross7884c192016-12-05 13:26:22 -080076 //"-DLOG_NDEBUG=0",
77 ],
78
79 cppflags: [
Colin Cross7884c192016-12-05 13:26:22 -080080 "-Wno-c99-extensions",
81 "-Wno-c++98-compat-pedantic",
82 "-Wno-exit-time-destructors",
Dan Stoza71bded52016-10-19 11:10:33 -070083 "-Wno-float-equal",
Colin Cross7884c192016-12-05 13:26:22 -080084 "-Wno-global-constructors",
85 "-Wno-zero-length-array",
86 ],
87
88 srcs: [
89 "api.cpp",
90 "api_gen.cpp",
91 "debug_report.cpp",
92 "driver.cpp",
93 "driver_gen.cpp",
94 "layers_extensions.cpp",
95 "stubhal.cpp",
96 "swapchain.cpp",
Colin Cross7884c192016-12-05 13:26:22 -080097 ],
98
Stephen Kiazyke77dce22017-03-14 15:38:12 -070099 header_libs: [
Jesse Hall408eda02019-04-12 15:39:16 -0700100 "hwvulkan_headers",
Paul Duffin08026182019-09-12 15:01:28 +0100101 "libnativeloader-headers",
Colin Cross7884c192016-12-05 13:26:22 -0800102 "vulkan_headers",
Sundong Ahnbc37dd52020-04-23 21:21:00 +0900103 "libsurfaceflinger_headers",
Colin Cross7884c192016-12-05 13:26:22 -0800104 ],
Jesse Hall408eda02019-04-12 15:39:16 -0700105 export_header_lib_headers: ["vulkan_headers"],
Colin Cross7884c192016-12-05 13:26:22 -0800106 shared_libs: [
Courtney Goeltzenleuchter7671d462018-01-24 11:51:01 -0800107 "android.hardware.configstore@1.0",
108 "android.hardware.configstore-utils",
Jaekyun Seokd56dec82016-11-25 16:20:40 +0900109 "libziparchive",
Colin Cross7884c192016-12-05 13:26:22 -0800110 "libhardware",
111 "libsync",
112 "libbase",
Courtney Goeltzenleuchter7671d462018-01-24 11:51:01 -0800113 "libhidlbase",
Colin Cross7884c192016-12-05 13:26:22 -0800114 "liblog",
Mathias Agopian991d2542017-02-06 13:51:32 -0800115 "libui",
Jiyong Park27c39e12017-05-08 13:00:02 +0900116 "libgraphicsenv",
Colin Cross7884c192016-12-05 13:26:22 -0800117 "libutils",
118 "libcutils",
119 "libz",
Jiyong Park2d81f3c2019-01-29 00:36:19 +0900120 "libnativebridge_lazy",
121 "libnativeloader_lazy",
Brian Andersondc96fdf2017-03-20 16:54:25 -0700122 "libnativewindow",
Yiwei Zhang06c66fb2020-10-14 08:42:26 -0700123 "libvndksupport",
Jooyung Han749b0ec2023-11-15 13:38:06 +0900124 "libdl_android",
Daniel Kochf25f5bb2017-10-05 00:26:58 -0400125 "android.hardware.graphics.common@1.0",
Sundong Ahnbc37dd52020-04-23 21:21:00 +0900126 "libSurfaceFlingerProp",
Colin Cross7884c192016-12-05 13:26:22 -0800127 ],
Tom Murphyea321842024-06-14 18:26:58 +0000128 static_libs: [
129 "libgrallocusage",
130 "libvulkanflags",
131 ],
Colin Cross7884c192016-12-05 13:26:22 -0800132}