blob: 921b09572657f2c61381b4e7ac5cd851477f4be3 [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.
Dan Albert0fbb5322016-10-04 17:49:33 -070016ndk_library {
Dan Willemsen219db6c2017-04-07 15:48:39 -070017 name: "libvulkan",
Dan Albert0fbb5322016-10-04 17:49:33 -070018 symbol_file: "libvulkan.map.txt",
19 first_version: "24",
Dan Albertb9c62a62017-01-05 15:58:50 -080020 unversioned_until: "current",
Dan Albert0fbb5322016-10-04 17:49:33 -070021}
Colin Cross7884c192016-12-05 13:26:22 -080022
Jesse Hall408eda02019-04-12 15:39:16 -070023llndk_library {
Colin Cross8af6d1c2020-10-19 13:38:00 -070024 name: "libvulkan.llndk",
Jesse Hall408eda02019-04-12 15:39:16 -070025 symbol_file: "libvulkan.map.txt",
26 export_llndk_headers: [
27 "vulkan_headers_llndk",
28 ],
29}
30
Colin Cross7884c192016-12-05 13:26:22 -080031cc_library_shared {
32 name: "libvulkan",
Colin Cross8af6d1c2020-10-19 13:38:00 -070033 llndk_stubs: "libvulkan.llndk",
Colin Cross7884c192016-12-05 13:26:22 -080034 clang: true,
35 sanitize: {
36 misc_undefined: ["integer"],
37 },
38
39 cflags: [
40 "-DLOG_TAG=\"vulkan\"",
41 "-DVK_USE_PLATFORM_ANDROID_KHR",
42 "-DVK_NO_PROTOTYPES",
43 "-fvisibility=hidden",
44 "-fstrict-aliasing",
Colin Cross1383d9f2019-11-06 13:33:40 -080045 "-Wextra",
Colin Cross7884c192016-12-05 13:26:22 -080046 "-Werror",
47 "-Wno-padded",
Colin Cross1383d9f2019-11-06 13:33:40 -080048 "-Wno-sign-compare",
Colin Cross7884c192016-12-05 13:26:22 -080049 "-Wno-switch-enum",
Colin Cross1383d9f2019-11-06 13:33:40 -080050 "-Wno-unused-variable",
51 "-Wno-unused-function",
Colin Cross7884c192016-12-05 13:26:22 -080052
dimitrya7cc50d2018-12-10 17:06:07 +010053 // Have clang emit complete debug_info.
54 "-fstandalone-debug",
55
Colin Cross7884c192016-12-05 13:26:22 -080056 //"-DLOG_NDEBUG=0",
57 ],
58
59 cppflags: [
Colin Cross7884c192016-12-05 13:26:22 -080060 "-Wno-c99-extensions",
61 "-Wno-c++98-compat-pedantic",
62 "-Wno-exit-time-destructors",
Dan Stoza71bded52016-10-19 11:10:33 -070063 "-Wno-float-equal",
Colin Cross7884c192016-12-05 13:26:22 -080064 "-Wno-global-constructors",
65 "-Wno-zero-length-array",
66 ],
67
68 srcs: [
69 "api.cpp",
70 "api_gen.cpp",
71 "debug_report.cpp",
72 "driver.cpp",
73 "driver_gen.cpp",
74 "layers_extensions.cpp",
75 "stubhal.cpp",
76 "swapchain.cpp",
Colin Cross7884c192016-12-05 13:26:22 -080077 ],
78
Stephen Kiazyke77dce22017-03-14 15:38:12 -070079 header_libs: [
Jesse Hall408eda02019-04-12 15:39:16 -070080 "hwvulkan_headers",
Paul Duffin08026182019-09-12 15:01:28 +010081 "libnativeloader-headers",
Colin Cross7884c192016-12-05 13:26:22 -080082 "vulkan_headers",
Sundong Ahnbc37dd52020-04-23 21:21:00 +090083 "libsurfaceflinger_headers",
Colin Cross7884c192016-12-05 13:26:22 -080084 ],
Jesse Hall408eda02019-04-12 15:39:16 -070085 export_header_lib_headers: ["vulkan_headers"],
Colin Cross7884c192016-12-05 13:26:22 -080086 shared_libs: [
Courtney Goeltzenleuchter7671d462018-01-24 11:51:01 -080087 "android.hardware.configstore@1.0",
88 "android.hardware.configstore-utils",
Jaekyun Seokd56dec82016-11-25 16:20:40 +090089 "libziparchive",
Colin Cross7884c192016-12-05 13:26:22 -080090 "libhardware",
91 "libsync",
92 "libbase",
dimitry4fdaa432019-03-19 12:29:27 +010093 "libdl_android",
Courtney Goeltzenleuchter7671d462018-01-24 11:51:01 -080094 "libhidlbase",
Colin Cross7884c192016-12-05 13:26:22 -080095 "liblog",
Mathias Agopian991d2542017-02-06 13:51:32 -080096 "libui",
Jiyong Park27c39e12017-05-08 13:00:02 +090097 "libgraphicsenv",
Colin Cross7884c192016-12-05 13:26:22 -080098 "libutils",
99 "libcutils",
100 "libz",
Jiyong Park2d81f3c2019-01-29 00:36:19 +0900101 "libnativebridge_lazy",
102 "libnativeloader_lazy",
Brian Andersondc96fdf2017-03-20 16:54:25 -0700103 "libnativewindow",
Daniel Kochf25f5bb2017-10-05 00:26:58 -0400104 "android.hardware.graphics.common@1.0",
Sundong Ahnbc37dd52020-04-23 21:21:00 +0900105 "libSurfaceFlingerProp",
Colin Cross7884c192016-12-05 13:26:22 -0800106 ],
Jesse Hall79927812017-03-23 11:03:23 -0700107 static_libs: ["libgrallocusage"],
Colin Cross7884c192016-12-05 13:26:22 -0800108}