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
17ohos_shared_library("tel_call_manager") {
18  sanitize = {
19    cfi = true
20    cfi_cross_dso = true
21    debug = false
22    cfi_vcall_icall_only = true
23  }
24  branch_protector_ret = "pac_ret"
25  sources = call_manager_sources
26
27  include_dirs = call_manager_include_dirs
28
29  deps = [
30    "frameworks/native:tel_call_manager_api",
31    "//third_party/cJSON:cjson",
32    "//third_party/libphonenumber/cpp:phonenumber_standard",
33  ]
34
35  external_deps = call_manager_external_deps
36
37  cflags_cc = [
38    "-Wunused",
39    "-Wunreachable-code",
40    "-fno-exceptions",
41    "-fno-rtti",
42    "-fstack-protector-all",
43    "-Os",
44    "-D_FORTIFY_SOURCE=2",
45    "-flto",
46    "-Wno-unused-but-set-variable",
47    "-fdata-sections",
48    "-ffunction-sections",
49    "-fno-asynchronous-unwind-tables",
50    "-fno-unwind-tables",
51    "-fvisibility=hidden",
52  ]
53
54  ldflags = [
55    "-flto",
56    "-Wl,--gc-sections",
57  ]
58
59  defines = [
60    "TELEPHONY_LOG_TAG = \"CallManager\"",
61    "LOG_DOMAIN = 0xD001F10",
62  ]
63  defines += call_manager_defines
64
65  part_name = "call_manager"
66  subsystem_name = "telephony"
67}
68