# Copyright (c) 2021 Huawei Device Co., Ltd. # 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 # # http://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. import("../dsoftbus_dfx.gni") dsoftbus_root_path = "../../../.." if (defined(ohos_lite)) { if (ohos_kernel_type == "liteos_m") { build_type = "static_library" } else { build_type = "shared_library" } config("dsoftbus_event_interface_lite") { include_dirs = [ "$dsoftbus_dfx_path/interface/include", "$dsoftbus_root_path/interfaces/kits/bus_center", "$dsoftbus_root_path/interfaces/kits/common", ] cflags = ohos_lite_cflags cflags_cc = ohos_lite_cflags } target(build_type, "softbus_dfx_event") { include_dirs = [ "$dsoftbus_dfx_path/interface/include", "$dsoftbus_root_path/interfaces/kits/bus_center", "$dsoftbus_root_path/interfaces/kits/common", ] sources = [ "src/softbus_event_virtual.c" ] public_configs = [ ":dsoftbus_event_interface_lite" ] } } else { config("dsoftbus_event_interface_std") { include_dirs = [ "$dsoftbus_dfx_path/interface/include", "$dsoftbus_root_path/interfaces/kits/bus_center", "$dsoftbus_root_path/interfaces/kits/common", ] } ohos_shared_library("softbus_dfx_event") { sanitize = { ubsan = true integer_overflow = true boundary_sanitize = true cfi = true cfi_cross_dso = true debug = false } branch_protector_ret = "pac_ret" include_dirs = [ "$dsoftbus_dfx_path/interface/include", "$dsoftbus_root_path/interfaces/kits/bus_center", "$dsoftbus_root_path/interfaces/kits/common", "src", ] sources = [ "src/conn_event.c", "src/disc_event.c", "src/lnn_event.c", "src/softbus_event.c", "src/stats_event.c", "src/trans_event.c", ] defines += [ "__STDC_FORMAT_MACROS" ] if (is_asan) { defines += [ "ASAN_BUILD" ] } public_configs = [ ":dsoftbus_event_interface_std" ] deps = [ "$dsoftbus_dfx_path/anonymize:softbus_dfx_anonymizer", "$dsoftbus_dfx_path/log:softbus_dfx_log", ] external_deps = [ "bounds_checking_function:libsec_shared", "hilog:libhilog", "hisysevent:libhisysevent", ] innerapi_tags = [ "platformsdk_indirect" ] part_name = "dsoftbus" subsystem_name = "communication" } }