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 cflags_cc = [ 30 "-fvisibility=hidden", 31 "-ffunction-sections", 32 "-fdata-sections", 33 "-Os", 34 ] 35 36 sources = [ 37 "../common/src/napi_utils.cpp", 38 "../common/src/napi_work.cpp", 39 "src/date_time_init.cpp", 40 "src/napi_system_date_time.cpp", 41 ] 42 43 deps = [ "${api_path}:time_client" ] 44 45 external_deps = [ 46 "ability_runtime:abilitykit_native", 47 "ability_runtime:wantagent_innerkits", 48 "c_utils:utils", 49 "hilog:libhilog", 50 "init:libbegetutil", 51 "ipc:ipc_single", 52 "napi:ace_napi", 53 "samgr:samgr_proxy", 54 ] 55 branch_protector_ret = "pac_ret" 56 sanitize = { 57 integer_overflow = true 58 ubsan = true 59 boundary_sanitize = true 60 cfi = true 61 cfi_cross_dso = true 62 debug = time_sanitize_debug 63 } 64 relative_install_dir = "module" 65 subsystem_name = "time" 66 part_name = "time_service" 67} 68