1# Copyright (c) 2022 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("//foundation/communication/netmanager_base/netmanager_base_config.gni") 16 17config("napi_utils_config") { 18 visibility = [ ":napi_utils" ] 19 include_dirs = [ "$INNERKITS_ROOT/include" ] 20} 21 22config("napi_utils_public_config") { 23 include_dirs = [ 24 "include", 25 "$THIRD_PARTY_ROOT/node/src", 26 ] 27 28 cflags = [ 29 "-fstack-protector-strong", 30 "-D_FORTIFY_SOURCE=2", 31 "-O2", 32 ] 33 34 cflags_cc = [ 35 "-fstack-protector-strong", 36 "-D_FORTIFY_SOURCE=2", 37 "-O2", 38 ] 39} 40 41ohos_shared_library("napi_utils") { 42 sanitize = { 43 cfi = true 44 cfi_cross_dso = true 45 boundary_sanitize = true 46 all_ubsan = true 47 debug = false 48 blocklist = "./napi_utils_blocklist.txt" 49 } 50 51 sources = [ 52 "src/base_context.cpp", 53 "src/event_listener.cpp", 54 "src/event_manager.cpp", 55 "src/module_template.cpp", 56 "src/napi_utils.cpp", 57 ] 58 59 configs = [ ":napi_utils_config" ] 60 61 public_configs = [ ":napi_utils_public_config" ] 62 63 public_deps = [ "$NETMANAGER_BASE_ROOT/utils:net_manager_common" ] 64 65 external_deps = [ 66 "c_utils:utils", 67 "hilog:libhilog", 68 "napi:ace_napi", 69 ] 70 71 innerapi_tags = [ "platformsdk" ] 72 part_name = "netmanager_base" 73 subsystem_name = "communication" 74} 75