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