diff --git a/BUILD.gn b/BUILD.gn index f745cbf3f3236c77a853a1aa52222894b2db9b38..ce63e68e391aed663d085b289bc87101303aa8b4 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 3ed3986aedce0e2f4ef2f0e071663e190fe764ce..32d50e6a54f22402684bee79e8e2e15ec012b957 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 0a21c9c2630b590d370dea5030498112117e35a8..6ab34c667332e5da6626a20d5e50886a8aad5a3d 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 324e61a16e98445b00d2dcbec1a581f2e5e81e9f..533a71c1eacb552ca97b79315ad23503521a19cd 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 b2504e70bf3b5b0e39f047c9b5847da5ff2050b2..37dcd9af81e93c581b72e90ce0cbc5e44ef50207 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",