1# Copyright (c) 2024 Huawei Device Co., Ltd. 2# Licensed under the Apache License, Version 2.0 (the "License"); 3# you may not use this file except in compliance with the License. 4# You may obtain a copy of the License at 5# 6# http://www.apache.org/licenses/LICENSE-2.0 7# 8# Unless required by applicable law or agreed to in writing, software 9# distributed under the License is distributed on an "AS IS" BASIS, 10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11# See the License for the specific language governing permissions and 12# limitations under the License. 13 14import("//build/ohos.gni") 15import("//drivers/hdf_core/adapter/uhdf2/uhdf.gni") 16 17ohos_shared_library("libchip_controller_chip_interface_service_1.0") { 18 branch_protector_ret = "pac_ret" 19 sanitize = { 20 cfi = true # Enable/disable control flow integrity detection 21 boundary_sanitize = true # Enable boundary san detection 22 cfi_cross_dso = true # Cross-SO CFI Checks 23 integer_overflow = true # Enable integer overflow detection 24 ubsan = true # Enable some Ubsan options 25 debug = false 26 } 27 include_dirs = [] 28 29 sources = [ 30 "hdi_sync_util.cpp", 31 "iface_tool.cpp", 32 "iface_util.cpp", 33 "wifi.cpp", 34 "wifi_ap_iface.cpp", 35 "wifi_chip.cpp", 36 "wifi_chip_modes.cpp", 37 "wifi_p2p_iface.cpp", 38 "wifi_sta_iface.cpp", 39 "wifi_vendor_hal.cpp", 40 "wifi_vendor_hal_list.cpp", 41 "wifi_vendor_hal_stubs.cpp", 42 ] 43 44 external_deps = [ 45 "c_utils:utils", 46 "drivers_interface_wlan:chip_idl_headers", 47 "hdf_core:libhdf_host", 48 "hdf_core:libhdf_utils", 49 "hilog:libhilog", 50 "init:libbegetutil", 51 "ipc:ipc_single", 52 ] 53 54 deps = [] 55 56 install_images = [ chipset_base_dir ] 57 subsystem_name = "hdf" 58 part_name = "drivers_peripheral_wlan" 59} 60 61ohos_shared_library("libchip_hdi_driver") { 62 branch_protector_ret = "pac_ret" 63 sanitize = { 64 cfi = true # Enable/disable control flow integrity detection 65 boundary_sanitize = true # Enable boundary san detection 66 cfi_cross_dso = true # Cross-SO CFI Checks 67 integer_overflow = true # Enable integer overflow detection 68 ubsan = true # Enable some Ubsan options 69 debug = false 70 } 71 include_dirs = [] 72 73 sources = [ "chip_controller_driver.cpp" ] 74 75 if (is_standard_system) { 76 external_deps = [ 77 "c_utils:utils", 78 "hdf_core:libhdf_host", 79 "hdf_core:libhdf_ipc_adapter", 80 "hdf_core:libhdf_utils", 81 "hdf_core:libhdi", 82 "hilog:libhilog", 83 "ipc:ipc_single", 84 ] 85 } else { 86 external_deps = [ 87 "hilog:libhilog", 88 "ipc:ipc_single", 89 ] 90 } 91 92 external_deps += [ "drivers_interface_wlan:libchip_stub_1.0" ] 93 94 shlib_type = "hdi" 95 install_images = [ chipset_base_dir ] 96 subsystem_name = "hdf" 97 part_name = "drivers_peripheral_wlan" 98} 99 100group("hdi_chip_service") { 101 deps = [ 102 ":libchip_controller_chip_interface_service_1.0", 103 ":libchip_hdi_driver", 104 ] 105} 106