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_ext_iface.cpp", 38 "wifi_p2p_iface.cpp", 39 "wifi_sta_iface.cpp", 40 "wifi_vendor_hal.cpp", 41 "wifi_vendor_hal_list.cpp", 42 "wifi_vendor_hal_stubs.cpp", 43 ] 44 45 external_deps = [ 46 "c_utils:utils", 47 "drivers_interface_wlan:chip_idl_headers", 48 "hdf_core:libhdf_host", 49 "hdf_core:libhdf_utils", 50 "hilog:libhilog", 51 "init:libbegetutil", 52 "ipc:ipc_single", 53 ] 54 55 deps = [] 56 57 install_images = [ chipset_base_dir ] 58 subsystem_name = "hdf" 59 part_name = "drivers_peripheral_wlan" 60} 61 62ohos_shared_library("libchip_hdi_driver") { 63 branch_protector_ret = "pac_ret" 64 sanitize = { 65 cfi = true # Enable/disable control flow integrity detection 66 boundary_sanitize = true # Enable boundary san detection 67 cfi_cross_dso = true # Cross-SO CFI Checks 68 integer_overflow = true # Enable integer overflow detection 69 ubsan = true # Enable some Ubsan options 70 debug = false 71 } 72 include_dirs = [] 73 74 sources = [ "chip_controller_driver.cpp" ] 75 76 if (is_standard_system) { 77 external_deps = [ 78 "c_utils:utils", 79 "hdf_core:libhdf_host", 80 "hdf_core:libhdf_ipc_adapter", 81 "hdf_core:libhdf_utils", 82 "hdf_core:libhdi", 83 "hilog:libhilog", 84 "ipc:ipc_single", 85 ] 86 } else { 87 external_deps = [ 88 "hilog:libhilog", 89 "ipc:ipc_single", 90 ] 91 } 92 93 external_deps += [ "drivers_interface_wlan:libchip_stub_1.0" ] 94 95 shlib_type = "hdi" 96 install_images = [ chipset_base_dir ] 97 subsystem_name = "hdf" 98 part_name = "drivers_peripheral_wlan" 99} 100 101group("hdi_chip_service") { 102 deps = [ 103 ":libchip_controller_chip_interface_service_1.0", 104 ":libchip_hdi_driver", 105 ] 106} 107