# 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 = "../../../.." softbus_anonymizer_src = [ "src/anonymizer.c" ] if (defined(ohos_lite)) { if (ohos_kernel_type == "liteos_m") { build_type = "static_library" libsec_external_deps = [ "bounds_checking_function:libsec_static" ] } else { build_type = "shared_library" libsec_external_deps = [ "bounds_checking_function:libsec_shared" ] } config("dsoftbus_anonymizer_interface_lite") { include_dirs = [ "$dsoftbus_dfx_path/interface/include", "$dsoftbus_root_path/interfaces/kits/common", "$hilog_lite_include_path", "$utils_lite_include_path", ] cflags = ohos_lite_cflags cflags_cc = ohos_lite_cflags } target(build_type, "softbus_dfx_anonymizer") { include_dirs = [ "$dsoftbus_dfx_path/interface/include", "$dsoftbus_root_path/interfaces/kits/common", ] sources = softbus_anonymizer_src deps = [ "$hilog_lite_deps_path" ] external_deps = libsec_external_deps public_configs = [ ":dsoftbus_anonymizer_interface_lite" ] } } else { config("dsoftbus_anonymizer_interface_std") { include_dirs = [ "$dsoftbus_dfx_path/interface/include", "$dsoftbus_root_path/interfaces/kits/common", ] } ohos_shared_library("softbus_dfx_anonymizer") { sanitize = { 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/common", ] sources = softbus_anonymizer_src defines += [ "__STDC_FORMAT_MACROS" ] if (is_asan) { defines += [ "ASAN_BUILD" ] } public_configs = [ ":dsoftbus_anonymizer_interface_std" ] deps = [ "$dsoftbus_dfx_path/log:softbus_dfx_log" ] external_deps = [ "bounds_checking_function:libsec_shared", "hilog:libhilog", ] innerapi_tags = [ "platformsdk_indirect" ] part_name = "dsoftbus" subsystem_name = "communication" } }