1# Copyright (C) 2021-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("callmanager.gni") 16 17declare_args() { 18 call_manager_feature_hfp_async_enable = false 19 call_manager_feature_not_support_multicall = false 20} 21 22ohos_shared_library("tel_call_manager") { 23 sanitize = { 24 cfi = true 25 cfi_cross_dso = true 26 debug = false 27 cfi_vcall_icall_only = true 28 } 29 branch_protector_ret = "pac_ret" 30 sources = call_manager_sources 31 32 include_dirs = call_manager_include_dirs 33 34 deps = [ 35 "frameworks/native:tel_call_manager_api", 36 "//third_party/cJSON:cjson", 37 "//third_party/libphonenumber/cpp:phonenumber_standard", 38 ] 39 40 external_deps = call_manager_external_deps 41 42 cflags_cc = [ 43 "-Wunused", 44 "-Wunreachable-code", 45 "-fno-exceptions", 46 "-fno-rtti", 47 "-fstack-protector-all", 48 "-Os", 49 "-D_FORTIFY_SOURCE=2", 50 "-flto", 51 "-Wno-unused-but-set-variable", 52 "-fdata-sections", 53 "-ffunction-sections", 54 "-fno-asynchronous-unwind-tables", 55 "-fno-unwind-tables", 56 "-fvisibility=hidden", 57 ] 58 59 ldflags = [ 60 "-flto", 61 "-Wl,--gc-sections", 62 ] 63 64 defines = [ 65 "TELEPHONY_LOG_TAG = \"CallManager\"", 66 "LOG_DOMAIN = 0xD001F10", 67 ] 68 69 if (call_manager_feature_hfp_async_enable) { 70 print("Support hfp async enable.") 71 defines += [ "HFP_ASYNC_ENABLE" ] 72 } 73 74 if (call_manager_feature_not_support_multicall) { 75 print("not Support multi call.") 76 defines += [ "NOT_SUPPORT_MULTICALL" ] 77 } 78 defines += call_manager_defines 79 80 part_name = "call_manager" 81 subsystem_name = "telephony" 82} 83