blob: 2935ff024c3f7141e6882d7b7ccef7cadffc971f [file] [log] [blame]
# Copyright 2024 The Fuchsia Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
cc_library(
name = "vulkan",
defines = [
"VULKAN_HPP_NO_EXCEPTIONS",
"VK_USE_PLATFORM_FUCHSIA=1",
] + select({
# We sometimes do things in testing that cause Vulkan functions to return something other than
# VK_SUCCESS. We could only override VULKAN_HPP_ASSERT_ON_RESULT, but some functions have other
# asserts that only make sense in the VK_SUCCESS path and may fail otherwise (e.g. asserting on the
# value of an out argument that isn't set).
":debug_build": ["VULKAN_HPP_ASSERT(expr)=((void)(expr))"],
":fastbuild_build": ["VULKAN_HPP_ASSERT(expr)=((void)(expr))"],
"//conditions:default": ["\"VULKAN_HPP_ASSERT(expr)=do {} while(0)\""],
}),
visibility = ["//visibility:public"],
deps = [
"@Vulkan-Headers//:headers",
"@fuchsia_sdk//pkg/vulkan",
],
)
config_setting(
name = "debug_build",
values = {
"compilation_mode": "dbg",
},
)
config_setting(
name = "fastbuild_build",
values = {
"compilation_mode": "fastbuild",
},
)