1# Copyright (c) 2022-2023 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("../../../../hdf_core/adapter/uhdf2/uhdf.gni") 16import("../../wlan.gni") 17 18HDI_SERVICE_ROOT_DIR = "../.." 19 20ohos_shared_library("libwlan_service_extend") { 21 branch_protector_ret = "pac_ret" 22 sanitize = { 23 cfi = true # Enable/disable control flow integrity detection 24 boundary_sanitize = false # Enable boundary san detection 25 cfi_cross_dso = true # Cross-SO CFI Checks 26 integer_overflow = false # Enable integer overflow detection 27 ubsan = false # Enable some Ubsan options 28 cfi_vcall_icall_only = true 29 debug = false 30 } 31 include_dirs = [ 32 "$HDI_SERVICE_ROOT_DIR/interfaces/include", 33 "$HDI_SERVICE_ROOT_DIR/client/include", 34 "$HDI_SERVICE_ROOT_DIR/hal/include", 35 "$HDI_SERVICE_ROOT_DIR/hdi_service/service_common", 36 "$HDI_SERVICE_ROOT_DIR/hdi_service/service_extend", 37 ] 38 sources = [] 39 40 if (drivers_peripheral_wlan_feature_enable_HDF_WLAN_EXTEND_VDI) { 41 sources += [ "service_extend_vdi/wlan_extend_cmd.c" ] 42 } else { 43 sources += [ "service_extend_direct/wlan_extend_cmd.c" ] 44 } 45 46 deps = [ "$HDI_SERVICE_ROOT_DIR/hal:wifi_hal" ] 47 48 external_deps = [ "drivers_interface_wlan:wlan_idl_headers" ] 49 50 defines = [ "__OHOS__USER__" ] 51 52 cflags = [ 53 "-Wall", 54 "-Wextra", 55 "-Werror", 56 "-fsigned-char", 57 "-fno-common", 58 "-fno-strict-aliasing", 59 "-fstack-protector-all", 60 ] 61 cflags += [ 62 "-fdata-sections", 63 "-ffunction-sections", 64 "-Os", 65 "-fno-merge-all-constants", 66 ] 67 ldflags = [ 68 "-Wl,--exclude-libs=ALL", 69 "-Wl,--gc-sections", 70 ] 71 if (is_standard_system) { 72 external_deps += [ 73 "c_utils:utils", 74 "hdf_core:libhdf_host", 75 "hdf_core:libhdf_ipc_adapter", 76 "hdf_core:libhdf_utils", 77 "hilog:libhilog", 78 ] 79 } else { 80 external_deps += [ "hilog:libhilog" ] 81 } 82 83 install_images = [ chipset_base_dir ] 84 subsystem_name = "hdf" 85 part_name = "drivers_peripheral_wlan" 86} 87