1# Copyright (C) 2021 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("../../../../time.gni")
15
16ohos_shared_library("systemdatetime") {
17  include_dirs = [
18    "../common/include",
19    "../../../interfaces/inner_api/include",
20    "include",
21  ]
22
23  configs = [ "${time_utils_path}:utils_config" ]
24
25  cflags = [
26    "-fPIC",
27    "-g3",
28  ]
29
30  sources = [
31    "../common/src/napi_utils.cpp",
32    "../common/src/napi_work.cpp",
33    "src/date_time_init.cpp",
34    "src/napi_system_date_time.cpp",
35  ]
36
37  deps = [ "${api_path}:time_client" ]
38
39  external_deps = [
40    "ability_runtime:abilitykit_native",
41    "ability_runtime:wantagent_innerkits",
42    "c_utils:utils",
43    "hilog:libhilog",
44    "init:libbegetutil",
45    "napi:ace_napi",
46  ]
47  branch_protector_ret = "pac_ret"
48  sanitize = {
49    integer_overflow = true
50    ubsan = true
51    boundary_sanitize = true
52    cfi = true
53    cfi_cross_dso = true
54    debug = time_sanitize_debug
55  }
56  relative_install_dir = "module"
57  subsystem_name = "time"
58  part_name = "time_service"
59}
60