From d2d27fd634e08b75bcba13e34db244ea830f7879 Mon Sep 17 00:00:00 2001 From: yang1946 Date: Wed, 10 Apr 2024 10:27:41 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E7=AD=BE=E5=90=8D=E4=BB=93?= =?UTF-8?q?=E7=8B=AC=E7=AB=8B=E7=BC=96=E8=AF=91=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: yang1946 --- BUILD.gn | 8 +++++-- bundle.json | 1 + interfaces/innerkits/code_sign_utils/BUILD.gn | 2 +- services/key_enable/BUILD.gn | 21 +++++++++++++------ utils/BUILD.gn | 1 + 5 files changed, 24 insertions(+), 9 deletions(-) diff --git a/BUILD.gn b/BUILD.gn index f745cbf..ce63e68 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright (c) 2023 Huawei Device Co., Ltd. +# Copyright (c) 2023-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 @@ -28,8 +28,12 @@ group("subcomponents") { "${code_signature_root_dir}/interfaces/innerkits/code_sign_attr_utils:libcode_sign_attr_utils", "${code_signature_root_dir}/interfaces/innerkits/code_sign_utils:libcode_sign_utils", "${code_signature_root_dir}/interfaces/innerkits/local_code_sign:liblocal_code_sign_sdk", - "${code_signature_root_dir}/services/key_enable:key_enable_targets", "${code_signature_root_dir}/services/local_code_sign:liblocal_code_sign", "${code_signature_root_dir}/services/local_code_sign:local_code_sign_configs", ] + + if (!ohos_indep_compiler_enable) { + deps += + [ "${code_signature_root_dir}/services/key_enable:key_enable_targets" ] + } } diff --git a/bundle.json b/bundle.json index 3ed3986..32d50e6 100644 --- a/bundle.json +++ b/bundle.json @@ -30,6 +30,7 @@ "hitrace", "hisysevent", "ability_base", + "bounds_checking_function", "c_utils", "ipc", "samgr", diff --git a/interfaces/innerkits/code_sign_utils/BUILD.gn b/interfaces/innerkits/code_sign_utils/BUILD.gn index 0a21c9c..6ab34c6 100644 --- a/interfaces/innerkits/code_sign_utils/BUILD.gn +++ b/interfaces/innerkits/code_sign_utils/BUILD.gn @@ -41,7 +41,7 @@ ohos_shared_library("libcode_sign_utils") { configs = [ "${code_signature_root_dir}:common_utils_config" ] deps = [ "${code_signature_root_dir}/utils:fsverity_sign_src_set" ] - if (host_os == "linux" && !is_asan) { + if (host_os == "linux" && !is_asan && !ohos_indep_compiler_enable) { deps += [ "${code_signature_root_dir}/services/key_enable:key_enable_lib" ] } else { sources += [ "${code_signature_root_dir}/services/key_enable/src/asan/disable_rust_interface.cpp" ] diff --git a/services/key_enable/BUILD.gn b/services/key_enable/BUILD.gn index 324e61a..533a71c 100644 --- a/services/key_enable/BUILD.gn +++ b/services/key_enable/BUILD.gn @@ -14,13 +14,8 @@ import("//build/ohos.gni") import("../../code_signature.gni") -common_deps = [ - "${rust_openssl_dir}/openssl:lib", - "utils:libkey_enable_utils", - "//third_party/rust/crates/cxx:lib", -] +common_deps = [ "utils:libkey_enable_utils" ] common_external_deps = [ - "c_utils:utils_rust", "hilog:hilog_rust", "hisysevent:hisysevent_rust", "ylong_json:lib", @@ -34,6 +29,13 @@ ohos_rust_executable("key_enable") { sources = [ "src/main.rs" ] deps = common_deps external_deps = common_external_deps + if (!ohos_indep_compiler_enable) { + deps += [ + "${rust_openssl_dir}/openssl:lib", + "//third_party/rust/crates/cxx:lib", + ] + external_deps += [ "c_utils:utils_rust" ] + } crate_name = "key_enable" crate_type = "bin" subsystem_name = "security" @@ -49,6 +51,13 @@ ohos_rust_shared_ffi("key_enable_lib") { sources = [ "src/lib.rs" ] deps = common_deps external_deps = common_external_deps + if (!ohos_indep_compiler_enable) { + deps += [ + "${rust_openssl_dir}/openssl:lib", + "//third_party/rust/crates/cxx:lib", + ] + external_deps += [ "c_utils:utils_rust" ] + } crate_name = "key_enable" subsystem_name = "security" part_name = "code_signature" diff --git a/utils/BUILD.gn b/utils/BUILD.gn index b2504e7..37dcd9a 100644 --- a/utils/BUILD.gn +++ b/utils/BUILD.gn @@ -32,6 +32,7 @@ ohos_source_set("fsverity_sign_src_set") { public_configs = [ "${code_signature_root_dir}:common_public_config" ] external_deps = [ + "bounds_checking_function:libsec_shared", "fsverity-utils:libfsverity_utils", "hilog:libhilog", "openssl:libcrypto_shared", -- Gitee