资源napi符号优化

Signed-off-by: huangjie <huangjie125@huawei.com>
This commit is contained in:
huangjie 2023-02-02 14:12:22 +08:00
parent 382774ddd2
commit 7f3e970bd0
6 changed files with 26 additions and 54 deletions

View File

@ -259,43 +259,3 @@ ohos_shared_library("librawfile") {
subsystem_name = "global"
part_name = "resource_management"
}
ohos_static_library("global_resmgr_static") {
sources = manager_sources
sources +=
[ "${resmgr_base_path}/dfx/hisysevent_adapter/hisysevent_adapter.cpp" ]
defines = [ "CONFIG_HILOG" ]
configs = [ ":resmgr_config" ]
include_dirs = [ "${resmgr_base_path}/dfx/hisysevent_adapter" ]
public_configs = [ ":resmgr_public_config" ]
all_dependent_configs = [ ":global_resmgr_all_deps_config" ]
deps = [
"//third_party/bounds_checking_function:libsec_shared",
"//third_party/zlib:shared_libz",
]
if (resource_management_support_icu) {
deps += [
"//third_party/icu/icu4c:shared_icui18n",
"//third_party/icu/icu4c:shared_icuuc",
]
defines += [ "SUPPORT_GRAPHICS" ]
}
external_deps = [
"ability_base:extractortool",
"hisysevent_native:libhisysevent",
"hitrace_native:hitrace_meter",
"hiviewdfx_hilog_native:libhilog",
]
subsystem_name = "global"
part_name = "resource_management"
}

View File

@ -14,18 +14,7 @@
1.0 {
global:
extern "C++" {
"OHOS::Global::Resource::CreateResConfig()";
"OHOS::Global::Resource::CreateResourceManager()";
"OHOS::Global::Resource::ResourceManager::~ResourceManager()";
"OHOS::Global::Resource::ResourceManagerImpl::~ResourceManagerImpl()";
"OHOS::Global::Resource::ResourceManagerImpl::GetResourcePaths()";
"OHOS::Global::Resource::Utils::LoadResourceFile(std::__h::basic_string<char, std::__h::char_traits<char>, std::__h::allocator<char> > const&, unsigned int&)";
"OHOS::Global::Resource::GetSysDefault()";
"OHOS::Global::Resource::UpdateSysDefault(icu_69::Locale const&, bool)";
"OHOS::Global::Resource::BuildFromString(char const*, char, OHOS::Global::Resource::RState&)";
"OHOS::Global::Resource::BuildFromParts(char const*, char const*, char const*, OHOS::Global::Resource::RState&)";
"OHOS::Global::Resource::HapResource::LoadFromIndex(char const*, OHOS::Global::Resource::ResConfigImpl const*, bool)";
"OHOS::Global::Resource::HapResource::GetQualifiers() const";
*OHOS::Global::Resource*;
};
local:
*;

View File

@ -50,7 +50,7 @@ ohos_unittest("resmgr_test") {
}
deps = [
"${resmgr_base_path}/frameworks/resmgr:global_resmgr_static",
"${resmgr_base_path}/frameworks/resmgr:global_resmgr",
"//third_party/googletest:gtest_main",
"//third_party/zlib:libz",
]

View File

@ -28,6 +28,8 @@ ohos_shared_library("resmgr_napi_core") {
"src/resource_manager_addon.cpp",
]
version_script = "libresmgr_napi_core.versionscript"
configs = [ ":resmgr_napi_core_public_config" ]
public_configs = [ ":resmgr_napi_core_public_config" ]

View File

@ -0,0 +1,21 @@
# 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.
1.0 {
global:
extern "C++" {
*OHOS::Global::Resource*;
};
local:
*;
};

View File

@ -35,7 +35,7 @@ ohos_fuzztest("ResmgrFuzzTest") {
sources = [ "resmgr_fuzzer.cpp" ]
deps = [
"${resmgr_base_path}/frameworks/resmgr:global_resmgr_static",
"${resmgr_base_path}/frameworks/resmgr:global_resmgr",
"//third_party/bounds_checking_function:libsec_shared",
]
}