# Copyright (C) 2022-2024 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("//base/location/config.gni") import("//build/ohos.gni") config("location_common_config") { visibility = [ ":*" ] include_dirs = [ "$LOCATION_ROOT_DIR/interfaces/inner_api/include" ] } local_base_sources = [ "$LOCATION_COMMON_DIR/source/app_identity.cpp", "$LOCATION_COMMON_DIR/source/common_hisysevent.cpp", "$LOCATION_COMMON_DIR/source/common_utils.cpp", "$LOCATION_COMMON_DIR/source/geo_address.cpp", "$LOCATION_COMMON_DIR/source/geo_coding_mock_info.cpp", "$LOCATION_COMMON_DIR/source/hook_utils.cpp", "$LOCATION_COMMON_DIR/source/location_data_rdb_helper.cpp", "$LOCATION_COMMON_DIR/source/location_data_rdb_manager.cpp", "$LOCATION_COMMON_DIR/source/location_dumper.cpp", "$LOCATION_COMMON_DIR/source/permission_manager.cpp", "$LOCATION_COMMON_DIR/source/request.cpp", "$LOCATION_COMMON_DIR/source/sa_load_with_statistic.cpp", "$LOCATION_COMMON_DIR/source/ui_extension_ability_connection.cpp", "$LOCATION_ROOT_DIR/frameworks/base_module/source/location.cpp", "$LOCATION_ROOT_DIR/frameworks/base_module/source/request_config.cpp", "$LOCATION_ROOT_DIR/frameworks/base_module/source/satellite_status.cpp", ] ohos_shared_library("lbsservice_common") { public_configs = [ ":location_common_config" ] sanitize = { cfi = true cfi_cross_dso = true debug = false } branch_protector_ret = "pac_ret" sources = local_base_sources deps = [ "$LOCATION_ROOT_DIR/frameworks/base_module:lbsbase_module" ] public_external_deps = [ "ability_base:zuri", "ability_runtime:extension_manager", "ability_runtime:wantagent_innerkits", "access_token:libaccesstoken_sdk", "access_token:libtokenid_sdk", "bundle_framework:appexecfwk_base", "c_utils:utils", "data_share:datashare_consumer", "hilog:libhilog", "hisysevent:libhisysevent", "init:libbegetutil", "ipc:ipc_single", "os_account:os_account_innerkits", "samgr:samgr_proxy", ] defines = [] if (is_emulator) { defines += [ "EMULATOR_ENABLED" ] } ldflags = [ "-Wl,--as-needed", "-Wl,--gc-sections", ] cflags_cc = [ "-ffunction-sections", "-fdata-sections", "-flto=thin", "-Os", ] # Used to control the export of dynamic library symbols. version_script = "liblbsservice_common_version_script.txt" innerapi_tags = [ "platformsdk" ] part_name = "location" subsystem_name = "location" } ohos_static_library("lbsservice_common_static") { public_configs = [ ":location_common_config" ] sanitize = { cfi = true cfi_cross_dso = true debug = false } branch_protector_ret = "pac_ret" sources = local_base_sources deps = [ "$LOCATION_ROOT_DIR/frameworks/base_module:lbsbase_module" ] public_external_deps = [ "ability_base:zuri", "ability_runtime:extension_manager", "ability_runtime:wantagent_innerkits", "access_token:libaccesstoken_sdk", "access_token:libtokenid_sdk", "bundle_framework:appexecfwk_base", "c_utils:utils", "data_share:datashare_consumer", "hilog:libhilog", "hisysevent:libhisysevent", "init:libbegetutil", "ipc:ipc_single", "os_account:os_account_innerkits", "samgr:samgr_proxy", ] defines = [] if (is_emulator) { defines += [ "EMULATOR_ENABLED" ] } part_name = "location" subsystem_name = "location" }