2024-05-13 07:01:37 +00:00
|
|
|
# Copyright (C) 2018-2019 The ANGLE Project Authors.
|
|
|
|
# Copyright (C) 2019-2023 LunarG, Inc.
|
|
|
|
# Copyright (c) 2023-2024 Huawei Device Co., Ltd.
|
2019-04-20 01:33:01 +00:00
|
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
# you may not use this file except in compliance with the License.
|
|
|
|
# You may obtain a copy of the License at
|
|
|
|
#
|
|
|
|
# https://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
#
|
|
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
# See the License for the specific language governing permissions and
|
|
|
|
# limitations under the License.
|
|
|
|
|
2024-02-05 08:06:26 +00:00
|
|
|
import("//build/ohos.gni")
|
2021-05-26 13:45:20 +00:00
|
|
|
|
2024-10-15 03:49:30 +00:00
|
|
|
group("vulkan_loader_test") {
|
|
|
|
testonly = true
|
|
|
|
|
|
|
|
public_deps = [ "openharmony/test:test" ]
|
|
|
|
}
|
|
|
|
|
2024-02-05 08:06:26 +00:00
|
|
|
# Vulkan loader build options
|
2019-04-20 01:33:01 +00:00
|
|
|
|
2024-02-05 08:06:26 +00:00
|
|
|
## Build libvulkan.so {{{
|
2019-04-20 01:33:01 +00:00
|
|
|
|
|
|
|
config("vulkan_internal_config") {
|
2024-05-13 07:01:37 +00:00
|
|
|
defines = [ "VK_ENABLE_BETA_EXTENSIONS" ]
|
2024-02-05 08:06:26 +00:00
|
|
|
cflags = [
|
|
|
|
"-Wno-conversion",
|
|
|
|
"-Wno-extra-semi",
|
|
|
|
"-Wno-sign-compare",
|
|
|
|
"-Wno-unreachable-code",
|
|
|
|
"-Wno-unused-function",
|
|
|
|
"-Wno-unused-variable",
|
|
|
|
"-fPIC",
|
|
|
|
]
|
2024-10-15 03:49:30 +00:00
|
|
|
cflags_cc = [ "-std=c++17" ]
|
2024-02-05 08:06:26 +00:00
|
|
|
ldflags = [ "-Wl,-Bsymbolic" ]
|
2019-04-20 01:33:01 +00:00
|
|
|
|
2024-02-05 08:06:26 +00:00
|
|
|
defines += [
|
2024-07-02 06:17:06 +00:00
|
|
|
"SYSCONFDIR=\"/system/etc:/vendor/etc\"",
|
2024-02-05 08:06:26 +00:00
|
|
|
"VK_USE_PLATFORM_OHOS",
|
|
|
|
]
|
|
|
|
}
|
2019-04-20 01:33:01 +00:00
|
|
|
|
|
|
|
config("vulkan_loader_config") {
|
|
|
|
include_dirs = [
|
2019-07-19 03:57:23 +00:00
|
|
|
"loader/generated",
|
2019-04-20 01:33:01 +00:00
|
|
|
"loader",
|
2024-02-05 08:06:26 +00:00
|
|
|
"openharmony",
|
2019-04-20 01:33:01 +00:00
|
|
|
]
|
2024-05-13 07:01:37 +00:00
|
|
|
defines = [ "LOADER_USE_UNSAFE_FILE_SEARCH=1" ]
|
2019-04-20 01:33:01 +00:00
|
|
|
}
|
2020-10-01 02:59:30 +00:00
|
|
|
|
2024-02-05 08:06:26 +00:00
|
|
|
ohos_shared_library("vulkan_loader") {
|
2024-08-30 06:52:40 +00:00
|
|
|
branch_protector_ret = "pac_ret"
|
2024-02-05 08:06:26 +00:00
|
|
|
sources = [
|
|
|
|
"loader/adapters.h",
|
|
|
|
"loader/allocation.c",
|
|
|
|
"loader/allocation.h",
|
|
|
|
"loader/cJSON.c",
|
|
|
|
"loader/cJSON.h",
|
|
|
|
"loader/debug_utils.c",
|
|
|
|
"loader/debug_utils.h",
|
|
|
|
"loader/dev_ext_trampoline.c",
|
|
|
|
"loader/extension_manual.c",
|
|
|
|
"loader/extension_manual.h",
|
|
|
|
"loader/generated/vk_layer_dispatch_table.h",
|
|
|
|
"loader/generated/vk_loader_extensions.h",
|
|
|
|
"loader/generated/vk_object_types.h",
|
|
|
|
"loader/gpa_helper.c",
|
|
|
|
"loader/gpa_helper.h",
|
|
|
|
"loader/loader.c",
|
|
|
|
"loader/loader.h",
|
|
|
|
"loader/loader_common.h",
|
2024-05-13 07:01:37 +00:00
|
|
|
"loader/loader_environment.c",
|
|
|
|
"loader/loader_environment.h",
|
2024-02-05 08:06:26 +00:00
|
|
|
"loader/log.c",
|
|
|
|
"loader/log.h",
|
|
|
|
"loader/phys_dev_ext.c",
|
2024-05-13 07:01:37 +00:00
|
|
|
"loader/settings.c",
|
|
|
|
"loader/settings.h",
|
2024-02-05 08:06:26 +00:00
|
|
|
"loader/stack_allocation.h",
|
|
|
|
"loader/terminator.c",
|
|
|
|
"loader/trampoline.c",
|
|
|
|
"loader/unknown_function_handling.c",
|
|
|
|
"loader/unknown_function_handling.h",
|
|
|
|
"loader/vk_loader_layer.h",
|
|
|
|
|
|
|
|
# TODO(jmadill): Use assembler where available.
|
|
|
|
"loader/unknown_ext_chain.c",
|
|
|
|
"loader/vk_loader_platform.h",
|
|
|
|
"loader/wsi.c",
|
|
|
|
"loader/wsi.h",
|
2024-10-15 03:49:30 +00:00
|
|
|
"openharmony/bundle_mgr_helper/vk_bundle_mgr_helper.cpp",
|
|
|
|
"openharmony/bundle_mgr_helper/vk_bundle_mgr_helper.h",
|
|
|
|
"openharmony/loader_hilog.h",
|
2024-02-05 08:06:26 +00:00
|
|
|
]
|
2020-10-01 02:59:30 +00:00
|
|
|
|
2024-02-05 08:06:26 +00:00
|
|
|
configs = [ ":vulkan_internal_config" ]
|
|
|
|
public_configs = [ ":vulkan_loader_config" ]
|
2024-04-18 13:00:32 +00:00
|
|
|
external_deps = [
|
2024-10-15 03:49:30 +00:00
|
|
|
"bundle_framework:appexecfwk_base",
|
|
|
|
"bundle_framework:appexecfwk_core",
|
|
|
|
"c_utils:utils",
|
2024-04-18 13:00:32 +00:00
|
|
|
"hilog:libhilog",
|
|
|
|
"init:libbegetutil",
|
2024-10-15 03:49:30 +00:00
|
|
|
"ipc:ipc_core",
|
|
|
|
"samgr:samgr_proxy",
|
2024-04-18 13:00:32 +00:00
|
|
|
]
|
2024-03-19 02:03:25 +00:00
|
|
|
public_external_deps = [ "vulkan-headers:vulkan_headers" ]
|
2020-10-01 02:59:30 +00:00
|
|
|
|
2024-02-05 08:06:26 +00:00
|
|
|
output_name = "vulkan"
|
|
|
|
output_extension = "so"
|
2020-10-01 02:59:30 +00:00
|
|
|
|
2024-07-17 06:39:32 +00:00
|
|
|
part_name = "vulkan-loader"
|
|
|
|
subsystem_name = "thirdparty"
|
2020-10-01 02:59:30 +00:00
|
|
|
|
2024-02-05 08:06:26 +00:00
|
|
|
license_file = "//third_party/vulkan-loader/LICENSE.txt"
|
2020-10-01 02:59:30 +00:00
|
|
|
}
|
2024-02-05 08:06:26 +00:00
|
|
|
## Build libvulkan.so }}}
|