Home | History | Annotate | Download | only in libvulkan
      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.
     16 ndk_library {
     17     name: "libvulkan",
     18     symbol_file: "libvulkan.map.txt",
     19     first_version: "24",
     20     unversioned_until: "current",
     21 }
     22 
     23 llndk_library {
     24     name: "libvulkan",
     25     symbol_file: "libvulkan.map.txt",
     26     export_llndk_headers: [
     27         "vulkan_headers_llndk",
     28     ],
     29 }
     30 
     31 cc_library_shared {
     32     name: "libvulkan",
     33     clang: true,
     34     sanitize: {
     35         misc_undefined: ["integer"],
     36     },
     37 
     38     cflags: [
     39         "-DLOG_TAG=\"vulkan\"",
     40         "-DVK_USE_PLATFORM_ANDROID_KHR",
     41         "-DVK_NO_PROTOTYPES",
     42         "-fvisibility=hidden",
     43         "-fstrict-aliasing",
     44         "-Weverything",
     45         "-Werror",
     46         "-Wno-padded",
     47         "-Wno-switch-enum",
     48         "-Wno-undef",
     49 
     50         // Have clang emit complete debug_info.
     51         "-fstandalone-debug",
     52 
     53         //"-DLOG_NDEBUG=0",
     54     ],
     55 
     56     cppflags: [
     57         "-Wno-c99-extensions",
     58         "-Wno-c++98-compat-pedantic",
     59         "-Wno-exit-time-destructors",
     60         "-Wno-float-equal",
     61         "-Wno-global-constructors",
     62         "-Wno-zero-length-array",
     63     ],
     64 
     65     srcs: [
     66         "api.cpp",
     67         "api_gen.cpp",
     68         "debug_report.cpp",
     69         "driver.cpp",
     70         "driver_gen.cpp",
     71         "layers_extensions.cpp",
     72         "stubhal.cpp",
     73         "swapchain.cpp",
     74     ],
     75 
     76     header_libs: [
     77         "hwvulkan_headers",
     78         "vulkan_headers",
     79     ],
     80     export_header_lib_headers: ["vulkan_headers"],
     81     shared_libs: [
     82         "android.hardware.configstore (a] 1.0",
     83         "android.hardware.configstore-utils",
     84         "libziparchive",
     85         "libhardware",
     86         "libsync",
     87         "libbase",
     88         "libdl_android",
     89         "libhidlbase",
     90         "libhidltransport",
     91         "liblog",
     92         "libui",
     93         "libgraphicsenv",
     94         "libutils",
     95         "libcutils",
     96         "libz",
     97         "libnativebridge_lazy",
     98         "libnativeloader_lazy",
     99         "libnativewindow",
    100         "android.hardware.graphics.common (a] 1.0",
    101     ],
    102     static_libs: ["libgrallocusage"],
    103 }
    104