diff --git a/bundle.json b/bundle.json index a33e05268a261c60778f6285e0114e294aad6267..1608c2ef1bc0fa0808e81f3484fb11f6db19275b 100644 --- a/bundle.json +++ b/bundle.json @@ -54,7 +54,6 @@ "base_group": [], "fwk_group": [ "//foundation/systemabilitymgr/samgr/interfaces/innerkits/common:samgr_common", - "//foundation/systemabilitymgr/samgr/interfaces/innerkits/dynamic_cache:dynamic_cache", "//foundation/systemabilitymgr/samgr/interfaces/innerkits/samgr_proxy:samgr_proxy" ], "service_group": [ @@ -98,15 +97,6 @@ "header_files": [] }, "name": "//foundation/systemabilitymgr/samgr/interfaces/innerkits/rust:samgr_rust" - }, - { - "header": { - "header_base": "//foundation/systemabilitymgr/samgr/interfaces/innerkits/dynamic_cache/include", - "header_files": [ - "dynamic_cache.h" - ] - }, - "name": "//foundation/systemabilitymgr/samgr/interfaces/innerkits/dynamic_cache:dynamic_cache" } ], "test": [ diff --git a/interfaces/innerkits/dynamic_cache/BUILD.gn b/interfaces/innerkits/dynamic_cache/BUILD.gn deleted file mode 100644 index 4c5fc7d3efcf2db5feb7fb3d49ac44af8832e151..0000000000000000000000000000000000000000 --- a/interfaces/innerkits/dynamic_cache/BUILD.gn +++ /dev/null @@ -1,47 +0,0 @@ -# Copyright (c) 2023 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("//build/ohos.gni") -import("//build/ohos_var.gni") - -################################################################################ - -config("dynamic_cache_config") { - include_dirs = [ "include" ] -} - -ohos_static_library("dynamic_cache") { - sanitize = { - cfi = true - cfi_cross_dso = true - debug = false - cfi_no_nvcall = true - blocklist = "../../../cfi_blocklist.txt" - } - branch_protector_ret = "pac_ret" - sources = [ "./src/dynamic_cache.cpp" ] - configs = [ "../samgr_proxy:samgr_proxy_config" ] - all_dependent_configs = [ ":dynamic_cache_config" ] - public_configs = [ ":dynamic_cache_config" ] - if (is_standard_system) { - external_deps = [ - "c_utils:utils", - "hilog:libhilog", - "init:libbegetutil", - "ipc:ipc_core", - ] - } - part_name = "samgr" - subsystem_name = "systemabilitymgr" -} -################################################################################ diff --git a/interfaces/innerkits/samgr_proxy/BUILD.gn b/interfaces/innerkits/samgr_proxy/BUILD.gn index 852f0b1c840202dd788a197029b3d60ae180bf74..25c18408e3078c211897cc48b710c7109f19ce3a 100644 --- a/interfaces/innerkits/samgr_proxy/BUILD.gn +++ b/interfaces/innerkits/samgr_proxy/BUILD.gn @@ -20,8 +20,10 @@ config("samgr_proxy_config") { } config("lsamgr_proxy_config") { - include_dirs = - [ "//foundation/systemabilitymgr/samgr/services/lsamgr/include" ] + include_dirs = [ + "//foundation/systemabilitymgr/samgr/interfaces/innerkits/dynamic_cache/src/dynamic_cache.cpp", + "//foundation/systemabilitymgr/samgr/services/lsamgr/include", + ] } config("samgr_proxy_private_config") { @@ -54,6 +56,7 @@ ohos_shared_library("samgr_proxy") { "//foundation/systemabilitymgr/samgr/frameworks/native/source/system_ability_on_demand_event.cpp", "//foundation/systemabilitymgr/samgr/frameworks/native/source/system_ability_status_change_stub.cpp", "//foundation/systemabilitymgr/samgr/frameworks/native/source/system_process_status_change_stub.cpp", + "//foundation/systemabilitymgr/samgr/interfaces/innerkits/dynamic_cache/src/dynamic_cache.cpp", "//foundation/systemabilitymgr/samgr/services/lsamgr/src/local_ability_manager_proxy.cpp", "//foundation/systemabilitymgr/samgr/services/lsamgr/src/local_abilitys.cpp", "//foundation/systemabilitymgr/samgr/services/samgr/native/source/service_registry.cpp", @@ -63,8 +66,6 @@ ohos_shared_library("samgr_proxy") { "//foundation/systemabilitymgr/samgr/test/resource:coverage_flags", ] - deps = [ "//foundation/systemabilitymgr/samgr/interfaces/innerkits/dynamic_cache:dynamic_cache" ] - public_configs = [ ":lsamgr_proxy_config", ":samgr_proxy_config", diff --git a/services/samgr/native/BUILD.gn b/services/samgr/native/BUILD.gn index 34cccf3648d6bd7a6b280ec6b42459cb64cbb89e..987ee6e6bf54d0957e66deac7be11be17923c835 100644 --- a/services/samgr/native/BUILD.gn +++ b/services/samgr/native/BUILD.gn @@ -31,6 +31,7 @@ config("sam_config") { "//foundation/systemabilitymgr/samgr/utils/native/include", "//foundation/systemabilitymgr/samgr/services/lsamgr/include", "//foundation/systemabilitymgr/samgr/interfaces/innerkits/common/include", + "//foundation/systemabilitymgr/samgr/interfaces/innerkits/dynamic_cache/include", "//foundation/systemabilitymgr/samgr/interfaces/innerkits/samgr_proxy/include", ] } @@ -48,6 +49,7 @@ ohos_executable("samgr") { install_enable = true sources = [ "//foundation/systemabilitymgr/samgr/frameworks/native/source/system_ability_load_callback_stub.cpp", + "//foundation/systemabilitymgr/samgr/interfaces/innerkits/dynamic_cache/src/dynamic_cache.cpp", "//foundation/systemabilitymgr/samgr/services/dfx/source/hisysevent_adapter.cpp", "//foundation/systemabilitymgr/samgr/services/lsamgr/src/local_ability_manager_proxy.cpp", "//foundation/systemabilitymgr/samgr/services/samgr/native/source/ability_death_recipient.cpp", @@ -76,7 +78,6 @@ ohos_executable("samgr") { deps = [ "//foundation/systemabilitymgr/samgr/interfaces/innerkits/common:samgr_common", - "//foundation/systemabilitymgr/samgr/interfaces/innerkits/dynamic_cache:dynamic_cache", "//foundation/systemabilitymgr/samgr/interfaces/innerkits/rust:samgr_rust", "//foundation/systemabilitymgr/samgr/interfaces/innerkits/samgr_proxy:samgr_proxy", ] diff --git a/services/samgr/native/test/unittest/BUILD.gn b/services/samgr/native/test/unittest/BUILD.gn index 3b0a2f5cca34994f365bedb1dd35546ae09200ad..5a81ea1f688333f5569fec971e14de855c005f49 100644 --- a/services/samgr/native/test/unittest/BUILD.gn +++ b/services/samgr/native/test/unittest/BUILD.gn @@ -23,6 +23,7 @@ config("sam_test_config") { visibility = [ ":*" ] include_dirs = [ "${samgr_services_dir}/test/unittest/include", + "//foundation/systemabilitymgr/samgr/interfaces/innerkits/dynamic_cache/include", "//foundation/systemabilitymgr/samgr/services/dfx/include", "//foundation/systemabilitymgr/samgr/utils/native/include", "//foundation/systemabilitymgr/samgr/services/lsamgr/include", @@ -35,6 +36,7 @@ config("samgr_proxy_config") { config("samgr_proxy_private_config") { include_dirs = [ + "//foundation/systemabilitymgr/samgr/interfaces/innerkits/dynamic_cache:dynamic_cache", "//foundation/systemabilitymgr/samgr/interfaces/innerkits/samgr_proxy/include", "//foundation/systemabilitymgr/samgr/interfaces/innerkits/lsamgr", "//foundation/systemabilitymgr/samgr/services/lsamgr/include", @@ -510,6 +512,7 @@ ohos_unittest("SystemAbilityMgrProxyTest") { "${samgr_services_dir}/test/unittest/src/system_ability_mgr_proxy_test.cpp", "//foundation/systemabilitymgr/samgr/frameworks/native/source/system_ability_manager_proxy.cpp", "//foundation/systemabilitymgr/samgr/frameworks/native/source/system_process_status_change_stub.cpp", + "//foundation/systemabilitymgr/samgr/interfaces/innerkits/dynamic_cache/src/dynamic_cache.cpp", "//foundation/systemabilitymgr/samgr/services/dfx/source/hisysevent_adapter.cpp", "//foundation/systemabilitymgr/samgr/services/lsamgr/src/local_ability_manager_proxy.cpp", "//foundation/systemabilitymgr/samgr/services/lsamgr/src/local_abilitys.cpp", @@ -525,10 +528,7 @@ ohos_unittest("SystemAbilityMgrProxyTest") { cflags = [ "-DBINDER_IPC_32BIT" ] } - deps = [ - ":samgr_proxy_tdd", - "//foundation/systemabilitymgr/samgr/interfaces/innerkits/dynamic_cache:dynamic_cache", - ] + deps = [ ":samgr_proxy_tdd" ] external_deps = [ "access_token:libaccesstoken_sdk", @@ -1009,6 +1009,7 @@ ohos_static_library("samgr_proxy_tdd") { "//foundation/systemabilitymgr/samgr/frameworks/native/source/system_ability_on_demand_event.cpp", "//foundation/systemabilitymgr/samgr/frameworks/native/source/system_ability_status_change_stub.cpp", "//foundation/systemabilitymgr/samgr/frameworks/native/source/system_process_status_change_stub.cpp", + "//foundation/systemabilitymgr/samgr/interfaces/innerkits/dynamic_cache/src/dynamic_cache.cpp", "//foundation/systemabilitymgr/samgr/services/lsamgr/src/local_ability_manager_proxy.cpp", "//foundation/systemabilitymgr/samgr/services/lsamgr/src/local_abilitys.cpp", "//foundation/systemabilitymgr/samgr/services/samgr/native/source/service_registry.cpp", @@ -1020,7 +1021,6 @@ ohos_static_library("samgr_proxy_tdd") { public_configs = [ ":samgr_proxy_config" ] - deps = [ "//foundation/systemabilitymgr/samgr/interfaces/innerkits/dynamic_cache:dynamic_cache" ] external_deps = [ "json:nlohmann_json_static" ] if (is_standard_system) { external_deps += [ diff --git a/test/fuzztest/samgr_fuzzer/BUILD.gn b/test/fuzztest/samgr_fuzzer/BUILD.gn index 62412f668815382a516618b63d11fcd187469db1..4f117329957af1c3540e5edab25e442c31528540 100644 --- a/test/fuzztest/samgr_fuzzer/BUILD.gn +++ b/test/fuzztest/samgr_fuzzer/BUILD.gn @@ -26,6 +26,7 @@ config("sam_fuzz_test_config") { "${samgr_dir}/services/lsamgr/include", "${samgr_dir}/services/samgr/native/test/unittest/include", "${samgr_dir}/test/fuzztest/samgr_fuzzer/include", + "//foundation/systemabilitymgr/samgr/interfaces/innerkits/dynamic_cache/include", ] } @@ -164,10 +165,10 @@ foreach(item, samgr_fuzztests) { "${samgr_services_dir}/source/system_ability_manager_util.cpp", "${samgr_services_dir}/test/unittest/src/mock_accesstoken_kit.cpp", "${samgr_services_dir}/test/unittest/src/mock_permission.cpp", + "//foundation/systemabilitymgr/samgr/interfaces/innerkits/dynamic_cache/src/dynamic_cache.cpp", "src/fuzztest_utils.cpp", item.source, ] - deps = [ "//foundation/systemabilitymgr/samgr/interfaces/innerkits/dynamic_cache:dynamic_cache" ] external_deps = [ "access_token:libaccesstoken_sdk", diff --git a/test/fuzztest/samgrcoverage_fuzzer/BUILD.gn b/test/fuzztest/samgrcoverage_fuzzer/BUILD.gn index 328c79b681e4bdec54b1eeec6e576043c7c7d4fd..05a17ee1bc6ce1a84f1a75cdb7fdacccc6e19c05 100644 --- a/test/fuzztest/samgrcoverage_fuzzer/BUILD.gn +++ b/test/fuzztest/samgrcoverage_fuzzer/BUILD.gn @@ -25,6 +25,7 @@ config("sam_fuzz_test_config") { "${samgr_dir}/services/dfx/include", "${samgr_dir}/services/lsamgr/include", "${samgr_dir}/services/samgr/native/test/unittest/include", + "//foundation/systemabilitymgr/samgr/interfaces/innerkits/dynamic_cache/include", ] } @@ -68,9 +69,9 @@ ohos_fuzztest("SamgrCoverageFuzzTest") { "${samgr_services_dir}/test/unittest/src/itest_transaction_service.cpp", "${samgr_services_dir}/test/unittest/src/mock_permission.cpp", "${samgr_services_dir}/test/unittest/src/sa_status_change_mock.cpp", + "//foundation/systemabilitymgr/samgr/interfaces/innerkits/dynamic_cache/src/dynamic_cache.cpp", "samgrcoverage_fuzzer.cpp", ] - deps = [ "//foundation/systemabilitymgr/samgr/interfaces/innerkits/dynamic_cache:dynamic_cache" ] external_deps = [ "access_token:libaccesstoken_sdk", diff --git a/test/fuzztest/samgrdumper_fuzzer/BUILD.gn b/test/fuzztest/samgrdumper_fuzzer/BUILD.gn index d644470c220aaeede36a4d86d68087ad25ce9479..0c6c73710d370e5696c737c59461747a0414a3b3 100644 --- a/test/fuzztest/samgrdumper_fuzzer/BUILD.gn +++ b/test/fuzztest/samgrdumper_fuzzer/BUILD.gn @@ -25,6 +25,7 @@ config("sam_fuzz_test_config") { "${samgr_dir}/services/dfx/include", "${samgr_dir}/services/lsamgr/include", "${samgr_dir}/services/samgr/native/test/unittest/include", + "//foundation/systemabilitymgr/samgr/interfaces/innerkits/dynamic_cache/include", ] } @@ -67,9 +68,9 @@ ohos_fuzztest("SamgrDumperFuzzTest") { "${samgr_services_dir}/source/system_ability_manager_util.cpp", "${samgr_services_dir}/test/unittest/src/mock_permission.cpp", "${samgr_services_dir}/test/unittest/src/sa_status_change_mock.cpp", + "//foundation/systemabilitymgr/samgr/interfaces/innerkits/dynamic_cache/src/dynamic_cache.cpp", "samgrdumper_fuzzer.cpp", ] - deps = [ "//foundation/systemabilitymgr/samgr/interfaces/innerkits/dynamic_cache:dynamic_cache" ] external_deps = [ "access_token:libaccesstoken_sdk", diff --git a/test/fuzztest/systemabilitymanager_fuzzer/BUILD.gn b/test/fuzztest/systemabilitymanager_fuzzer/BUILD.gn index bd0e4c0702956a7eaef765e722846a0188508974..9d16b344f0e71bb61dc849c84d3f9f384dcddcdc 100644 --- a/test/fuzztest/systemabilitymanager_fuzzer/BUILD.gn +++ b/test/fuzztest/systemabilitymanager_fuzzer/BUILD.gn @@ -22,6 +22,7 @@ samgr_services_dir = "${samgr_dir}/services/samgr/native" config("sam_fuzz_test_config") { include_dirs = [ + "//foundation/systemabilitymgr/samgr/interfaces/innerkits/dynamic_cache/include", "//foundation/systemabilitymgr/samgr/services/dfx/include", "//foundation/systemabilitymgr/samgr/services/lsamgr/include", "//foundation/systemabilitymgr/samgr/services/samgr/native/test/unittest/include", @@ -63,13 +64,13 @@ ohos_fuzztest("SystemAbilityManagerFuzzTest") { "${samgr_services_dir}/source/system_ability_manager_dumper.cpp", "${samgr_services_dir}/source/system_ability_manager_stub.cpp", "${samgr_services_dir}/source/system_ability_manager_util.cpp", + "//foundation/systemabilitymgr/samgr/interfaces/innerkits/dynamic_cache/src/dynamic_cache.cpp", "//foundation/systemabilitymgr/samgr/services/dfx/source/hisysevent_adapter.cpp", "//foundation/systemabilitymgr/samgr/services/samgr/native/source/ability_death_recipient.cpp", "//foundation/systemabilitymgr/samgr/services/samgr/native/source/rpc_callback_imp.cpp", "//foundation/systemabilitymgr/samgr/services/samgr/native/test/unittest/src/mock_permission.cpp", "systemabilitymanager_fuzzer.cpp", ] - deps = [ "//foundation/systemabilitymgr/samgr/interfaces/innerkits/dynamic_cache:dynamic_cache" ] external_deps = [ "access_token:libaccesstoken_sdk",