编译优化rom占用

Signed-off-by: haixiangw <wanghaixiang@huawei.com>
This commit is contained in:
haixiangw 2023-03-02 04:47:58 -08:00
parent e4807b1ba8
commit b4fd590cff
9 changed files with 57 additions and 77 deletions

View File

@ -196,9 +196,7 @@ group("cert_manager_type_fwk") {
group("cert_manager_typer_services") {
if (os_level == "standard") {
deps = [
"//base/security/certificate_manager/frameworks/cert_manager_standard/main:cert_manager_standard_frameworks",
"//base/security/certificate_manager/services/cert_manager_standard:cert_manager_service",
"//base/security/certificate_manager/services/cert_manager_standard/cert_manager_engine/main/core:cert_manager_engine_core_standard",
"//base/security/certificate_manager/services/cert_manager_standard/cert_manager_service/main/os_dependency/sa/sa_profile:cert_manager_sa_profile",
]
} else if (os_level == "small") {

View File

@ -16,8 +16,9 @@ import("//build/ohos.gni")
group("cert_manager_standard_frameworks") {
if (os_level == "standard") {
public_deps = [
"//base/security/certificate_manager/frameworks/cert_manager_standard/main/os_dependency:libcert_manager_os_dependency_standard_static",
"//base/security/certificate_manager/frameworks/cert_manager_standard/main/common:libcert_manager_common_standard_static",
"common:libcert_manager_common_standard_static",
"os_dependency:libcert_manager_ipc_client_static",
"os_dependency:libcert_manager_log_mem_static",
]
}
}

View File

@ -13,23 +13,47 @@
import("//build/ohos.gni")
config("cert_manager_config") {
include_dirs = [
"include",
"cm_ipc/include",
]
config("cert_manager_log_mem_config") {
include_dirs = [ "../common/include" ]
}
ohos_static_library("libcert_manager_os_dependency_standard_static") {
ohos_static_library("libcert_manager_log_mem_static") {
subsystem_name = "security"
part_name = "certificate_manager"
public_configs = [ ":cert_manager_config" ]
include_dirs = [
"log",
"//commonlibrary/c_utils/base/include",
"//utils/system/safwk/native/include",
"../../../../interfaces/innerkits/cert_manager_standard/main/include",
public_configs = [ ":cert_manager_log_mem_config" ]
include_dirs =
[ "../../../../interfaces/innerkits/cert_manager_standard/main/include" ]
defines = [
"L2_STANDARD",
"_CM_LOG_ENABLE_",
]
sources = [
"./log/cm_log.c",
"./posix/cm_mem.c",
]
external_deps = [
"c_utils:utils",
"hiviewdfx_hilog_native:libhilog",
]
cflags = [
"-DHILOG_ENABLE",
"-Wall",
"-Werror",
]
complete_static_lib = true
}
config("cert_manager_ipc_client_config") {
include_dirs = [ "cm_ipc/include" ]
}
ohos_static_library("libcert_manager_ipc_client_static") {
subsystem_name = "security"
part_name = "certificate_manager"
public_configs = [ ":cert_manager_ipc_client_config" ]
include_dirs =
[ "../../../../interfaces/innerkits/cert_manager_standard/main/include" ]
defines = [
"L2_STANDARD",
"_CM_LOG_ENABLE_",
@ -39,14 +63,13 @@ ohos_static_library("libcert_manager_os_dependency_standard_static") {
"./cm_ipc/src/cm_ipc_client_serialization.c",
"./cm_ipc/src/cm_load_sa.cpp",
"./cm_ipc/src/cm_request.cpp",
"./log/cm_log.c",
"./posix/cm_mem.c",
]
deps = [
"//base/security/certificate_manager/frameworks/cert_manager_standard/main/common:libcert_manager_common_standard_static",
":libcert_manager_log_mem_static",
"//third_party/openssl:libcrypto_shared",
]
external_deps = [
"c_utils:utils",
"hiviewdfx_hilog_native:libhilog",
"ipc:ipc_core",
"samgr:samgr_proxy",

View File

@ -34,7 +34,8 @@ ohos_shared_library("cert_manager_service") {
]
deps = [
":cert_manager_service.rc",
"//base/security/certificate_manager/services/cert_manager_standard/cert_manager_service/main:libcert_manager_service_standard_static",
"cert_manager_engine/main/core:cert_manager_engine_core_standard",
"cert_manager_service/main/os_dependency:libcert_manager_service_os_dependency_standard_static",
]
external_deps = [
"hiviewdfx_hilog_native:libhilog",

View File

@ -13,25 +13,19 @@
import("//build/ohos.gni")
config("cert_manager_config") {
config("cert_manager_engine_core_config") {
include_dirs = [ "include" ]
}
ohos_shared_library("cert_manager_engine_core_standard") {
sanitize = {
cfi = true
debug = false
blocklist = "//base/security/certificate_manager/cfi_blocklist.txt"
}
ohos_static_library("cert_manager_engine_core_standard") {
subsystem_name = "security"
part_name = "certificate_manager"
public_configs = [ ":cert_manager_config" ]
public_configs = [ ":cert_manager_engine_core_config" ]
defines = [
"L2_STANDARD",
"_CM_LOG_ENABLE_",
]
include_dirs = [
"../../../../../interfaces/innerkits/cert_manager_standard/main/include",
"//base/security/certificate_manager/services/cert_manager_standard/cert_manager_engine/main/core/include",
"//third_party/openssl/include",
]
cflags = [
@ -62,7 +56,8 @@ ohos_shared_library("cert_manager_engine_core_standard") {
]
deps = [
"//base/security/certificate_manager/frameworks/cert_manager_standard/main:cert_manager_standard_frameworks",
"../../../../../frameworks/cert_manager_standard/main/common:libcert_manager_common_standard_static",
"../../../../../frameworks/cert_manager_standard/main/os_dependency:libcert_manager_log_mem_static",
"//base/security/crypto_framework/frameworks:crypto_framework_lib",
"//third_party/openssl:libcrypto_shared",
]

View File

@ -1,28 +0,0 @@
# Copyright (C) 2022 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")
ohos_static_library("libcert_manager_service_standard_static") {
subsystem_name = "security"
part_name = "certificate_manager"
defines = [
"L2_STANDARD",
"_CM_LOG_ENABLE_",
]
public_deps = [
"//base/security/certificate_manager/services/cert_manager_standard/cert_manager_service/main/os_dependency:libcert_manager_service_os_dependency_standard_static",
]
complete_static_lib = true
}

View File

@ -13,19 +13,12 @@
import("//build/ohos.gni")
config("cert_manager_config") {
include_dirs = [ "service" ]
}
ohos_static_library("libcert_manager_service_os_dependency_standard_static") {
subsystem_name = "security"
part_name = "certificate_manager"
public_configs = [ ":cert_manager_config" ]
include_dirs = [
"//third_party/json/include",
"//commonlibrary/c_utils/base/include",
"//utils/system/safwk/native/include",
"//base/security/certificate_manager/services/cert_manager_standard/cert_manager_engine/main/core/include",
"../../../cert_manager_engine/main/core/include",
"../../../../../interfaces/innerkits/cert_manager_standard/main/include",
]
@ -35,12 +28,13 @@ ohos_static_library("libcert_manager_service_os_dependency_standard_static") {
]
sources = [ "sa/cm_sa.cpp" ]
deps = [
"//base/security/certificate_manager/frameworks/cert_manager_standard/main/common:libcert_manager_common_standard_static",
"//base/security/certificate_manager/frameworks/cert_manager_standard/main/os_dependency:libcert_manager_os_dependency_standard_static",
"../../../../../frameworks/cert_manager_standard/main/common:libcert_manager_common_standard_static",
"../../../../../frameworks/cert_manager_standard/main/os_dependency:libcert_manager_log_mem_static",
"idl:libcm_service_idl_standard_static",
]
public_deps = [ "//base/security/certificate_manager/services/cert_manager_standard/cert_manager_service/main/os_dependency/idl:libcm_service_idl_standard_static" ]
external_deps = [
"c_utils:utils",
"hiviewdfx_hilog_native:libhilog",
"ipc:ipc_core",
"safwk:system_ability_fwk",
@ -53,7 +47,6 @@ ohos_static_library("libcert_manager_service_os_dependency_standard_static") {
external_deps += [
"ability_base:want",
"bundle_framework:appexecfwk_base",
"c_utils:utils",
"common_event_service:cesfwk_innerkits",
"os_account:os_account_innerkits",
]

View File

@ -23,10 +23,9 @@ ohos_static_library("libcm_service_idl_standard_static") {
public_configs = [ ":cert_manager_config" ]
include_dirs = [
"//third_party/json/include",
"//commonlibrary/c_utils/base/include",
"//third_party/openssl/include",
"//base/security/certificate_manager/services/cert_manager_standard/cert_manager_service/main/hisysevent_wrapper/include",
"../../../../../../interfaces/innerkits/cert_manager_standard/main/include",
"../../../../cert_manager_engine/main/core/include",
]
defines = [
"L2_STANDARD",
@ -38,10 +37,9 @@ ohos_static_library("libcm_service_idl_standard_static") {
"cm_ipc/cm_response.cpp",
]
deps = [
"//base/security/certificate_manager/frameworks/cert_manager_standard/main/common:libcert_manager_common_standard_static",
"//base/security/certificate_manager/frameworks/cert_manager_standard/main/os_dependency:libcert_manager_os_dependency_standard_static",
"//base/security/certificate_manager/services/cert_manager_standard/cert_manager_engine/main/core:cert_manager_engine_core_standard",
"//base/security/certificate_manager/services/cert_manager_standard/cert_manager_service/main/hisysevent_wrapper:libcert_manager_hisysevent_wrapper_static",
"../../../../../../frameworks/cert_manager_standard/main/common:libcert_manager_common_standard_static",
"../../../../../../frameworks/cert_manager_standard/main/os_dependency:libcert_manager_log_mem_static",
"../../hisysevent_wrapper:libcert_manager_hisysevent_wrapper_static",
"//third_party/openssl:libcrypto_shared",
]
external_deps = [

View File

@ -44,7 +44,6 @@ ohos_fuzztest("CmSendRequestFuzzTest") {
"//base/security/access_token/interfaces/innerkits/accesstoken:libaccesstoken_sdk",
"//base/security/access_token/interfaces/innerkits/nativetoken:libnativetoken",
"//base/security/access_token/interfaces/innerkits/token_setproc:libtoken_setproc",
"//base/security/certificate_manager/frameworks/cert_manager_standard/main/os_dependency:libcert_manager_os_dependency_standard_static",
"//base/security/certificate_manager/interfaces/innerkits/cert_manager_standard/main:cert_manager_sdk",
"//base/security/certificate_manager/test/fuzz_test/fuzz_test_common:libcert_manager_fuzz_test_common_static",
]