From b6071ce7799df8ec6be46b76331696a63cb91e28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E6=B0=B8=E5=BF=A0?= Date: Thu, 28 Mar 2024 11:47:09 +0000 Subject: [PATCH] modfiy gn of the independent compilation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 王永忠 --- bundle.json | 4 +++- frameworks/BUILD.gn | 4 ---- frameworks/js/napi/crypto/BUILD.gn | 13 +++---------- plugin/BUILD.gn | 10 ++-------- .../hcfciphercreate_fuzzer/BUILD.gn | 2 +- .../hcfkeyagreementcreate_fuzzer/BUILD.gn | 2 +- .../crypto_operation/hcfmaccreate_fuzzer/BUILD.gn | 2 +- .../crypto_operation/hcfmdcreate_fuzzer/BUILD.gn | 2 +- .../crypto_operation/hcfsigncreate_fuzzer/BUILD.gn | 2 +- .../hcfverifycreate_fuzzer/BUILD.gn | 2 +- test/fuzztest/key/asykeygenerator_fuzzer/BUILD.gn | 8 +++----- test/fuzztest/key/dhkeyutil_fuzzer/BUILD.gn | 6 ++---- test/fuzztest/key/ecckeyutil_fuzzer/BUILD.gn | 6 ++---- test/fuzztest/key/symkeygenerator_fuzzer/BUILD.gn | 7 ++----- test/fuzztest/rand/hcfrandcreate_fuzzer/BUILD.gn | 2 +- test/unittest/BUILD.gn | 10 +++------- 16 files changed, 27 insertions(+), 55 deletions(-) diff --git a/bundle.json b/bundle.json index f955ddc..46d85cf 100644 --- a/bundle.json +++ b/bundle.json @@ -25,7 +25,9 @@ "components": [ "hilog", "c_utils", - "napi" + "napi", + "openssl", + "bounds_checking_function" ], "third_party": [ "openssl", diff --git a/frameworks/BUILD.gn b/frameworks/BUILD.gn index ba063dc..eb8b06b 100644 --- a/frameworks/BUILD.gn +++ b/frameworks/BUILD.gn @@ -29,10 +29,6 @@ ohos_shared_library("crypto_framework_lib") { innerapi_tags = [ "platformsdk" ] part_name = "crypto_framework" public_configs = [ ":framework_config" ] - include_dirs = [ - "//commonlibrary/c_utils/base/include", - "//base/hiviewdfx/hilog/interfaces/native/innerkits/include", - ] include_dirs += framework_inc_path + crypto_framwork_common_inc_path sources = framework_files diff --git a/frameworks/js/napi/crypto/BUILD.gn b/frameworks/js/napi/crypto/BUILD.gn index 37fa9c6..d2b7900 100644 --- a/frameworks/js/napi/crypto/BUILD.gn +++ b/frameworks/js/napi/crypto/BUILD.gn @@ -19,12 +19,7 @@ ohos_shared_library("cryptoframework_napi") { subsystem_name = "security" part_name = "crypto_framework" relative_install_dir = "module/security" - include_dirs = [ - "//third_party/bounds_checking_function/include", - "//commonlibrary/c_utils/base/include", - "//base/security/crypto_framework/frameworks/js/napi/crypto/inc", - "//base/hiviewdfx/hilog/interfaces/native/innerkits/include", - ] + include_dirs = [ "//base/security/crypto_framework/frameworks/js/napi/crypto/inc" ] include_dirs += framework_inc_path if (os_level == "standard") { @@ -66,12 +61,10 @@ ohos_shared_library("cryptoframework_napi") { "src/napi_verify.cpp", ] - deps = [ - "//base/security/crypto_framework/frameworks:crypto_framework_lib", - "//third_party/bounds_checking_function:libsec_shared", - ] + deps = [ "//base/security/crypto_framework/frameworks:crypto_framework_lib" ] external_deps = [ + "bounds_checking_function:libsec_shared", "hilog:libhilog", "napi:ace_napi", ] diff --git a/plugin/BUILD.gn b/plugin/BUILD.gn index 20292e7..815286c 100644 --- a/plugin/BUILD.gn +++ b/plugin/BUILD.gn @@ -30,10 +30,6 @@ ohos_shared_library("crypto_openssl_plugin_lib") { innerapi_tags = [ "platformsdk_indirect" ] part_name = "crypto_framework" public_configs = [ ":plugin_config" ] - include_dirs = [ - "//commonlibrary/c_utils/base/include", - "//third_party/openssl/include/", - ] include_dirs += plugin_inc_path + crypto_framwork_common_inc_path sources = plugin_files @@ -52,14 +48,12 @@ ohos_shared_library("crypto_openssl_plugin_lib") { "-Wall", ] - deps = [ - "//base/security/crypto_framework/common:crypto_plugin_common", - "//third_party/openssl:libcrypto_shared", - ] + deps = [ "//base/security/crypto_framework/common:crypto_plugin_common" ] external_deps = [ "c_utils:utils", "hilog:libhilog", + "openssl:libcrypto_shared", ] defines = [ "OPENSSL_SUPPRESS_DEPRECATED" ] } diff --git a/test/fuzztest/crypto_operation/hcfciphercreate_fuzzer/BUILD.gn b/test/fuzztest/crypto_operation/hcfciphercreate_fuzzer/BUILD.gn index d89b33d..2f7cfeb 100755 --- a/test/fuzztest/crypto_operation/hcfciphercreate_fuzzer/BUILD.gn +++ b/test/fuzztest/crypto_operation/hcfciphercreate_fuzzer/BUILD.gn @@ -30,9 +30,9 @@ ohos_fuzztest("HcfCipherCreateFuzzTest") { "-fno-omit-frame-pointer", ] sources = [ "hcfciphercreate_fuzzer.cpp" ] - deps = [ "//third_party/bounds_checking_function:libsec_shared" ] external_deps = [ + "bounds_checking_function:libsec_shared", "c_utils:utils", "crypto_framework:crypto_framework_lib", "hilog:libhilog", diff --git a/test/fuzztest/crypto_operation/hcfkeyagreementcreate_fuzzer/BUILD.gn b/test/fuzztest/crypto_operation/hcfkeyagreementcreate_fuzzer/BUILD.gn index e48b5d8..d8d13c0 100755 --- a/test/fuzztest/crypto_operation/hcfkeyagreementcreate_fuzzer/BUILD.gn +++ b/test/fuzztest/crypto_operation/hcfkeyagreementcreate_fuzzer/BUILD.gn @@ -30,9 +30,9 @@ ohos_fuzztest("HcfKeyAgreementCreateFuzzTest") { "-fno-omit-frame-pointer", ] sources = [ "hcfkeyagreementcreate_fuzzer.cpp" ] - deps = [ "//third_party/bounds_checking_function:libsec_shared" ] external_deps = [ + "bounds_checking_function:libsec_shared", "c_utils:utils", "crypto_framework:crypto_framework_lib", "hilog:libhilog", diff --git a/test/fuzztest/crypto_operation/hcfmaccreate_fuzzer/BUILD.gn b/test/fuzztest/crypto_operation/hcfmaccreate_fuzzer/BUILD.gn index 38ee25f..41edf50 100755 --- a/test/fuzztest/crypto_operation/hcfmaccreate_fuzzer/BUILD.gn +++ b/test/fuzztest/crypto_operation/hcfmaccreate_fuzzer/BUILD.gn @@ -30,9 +30,9 @@ ohos_fuzztest("HcfMacCreateFuzzTest") { "-fno-omit-frame-pointer", ] sources = [ "hcfmaccreate_fuzzer.cpp" ] - deps = [ "//third_party/bounds_checking_function:libsec_shared" ] external_deps = [ + "bounds_checking_function:libsec_shared", "c_utils:utils", "crypto_framework:crypto_framework_lib", "hilog:libhilog", diff --git a/test/fuzztest/crypto_operation/hcfmdcreate_fuzzer/BUILD.gn b/test/fuzztest/crypto_operation/hcfmdcreate_fuzzer/BUILD.gn index d060219..05ff22e 100755 --- a/test/fuzztest/crypto_operation/hcfmdcreate_fuzzer/BUILD.gn +++ b/test/fuzztest/crypto_operation/hcfmdcreate_fuzzer/BUILD.gn @@ -30,9 +30,9 @@ ohos_fuzztest("HcfMdCreateFuzzTest") { "-fno-omit-frame-pointer", ] sources = [ "hcfmdcreate_fuzzer.cpp" ] - deps = [ "//third_party/bounds_checking_function:libsec_shared" ] external_deps = [ + "bounds_checking_function:libsec_shared", "c_utils:utils", "crypto_framework:crypto_framework_lib", "hilog:libhilog", diff --git a/test/fuzztest/crypto_operation/hcfsigncreate_fuzzer/BUILD.gn b/test/fuzztest/crypto_operation/hcfsigncreate_fuzzer/BUILD.gn index d372f01..4518a51 100755 --- a/test/fuzztest/crypto_operation/hcfsigncreate_fuzzer/BUILD.gn +++ b/test/fuzztest/crypto_operation/hcfsigncreate_fuzzer/BUILD.gn @@ -30,9 +30,9 @@ ohos_fuzztest("HcfSignCreateFuzzTest") { "-fno-omit-frame-pointer", ] sources = [ "hcfsigncreate_fuzzer.cpp" ] - deps = [ "//third_party/bounds_checking_function:libsec_shared" ] external_deps = [ + "bounds_checking_function:libsec_shared", "c_utils:utils", "crypto_framework:crypto_framework_lib", "hilog:libhilog", diff --git a/test/fuzztest/crypto_operation/hcfverifycreate_fuzzer/BUILD.gn b/test/fuzztest/crypto_operation/hcfverifycreate_fuzzer/BUILD.gn index 5a68363..682dd6f 100755 --- a/test/fuzztest/crypto_operation/hcfverifycreate_fuzzer/BUILD.gn +++ b/test/fuzztest/crypto_operation/hcfverifycreate_fuzzer/BUILD.gn @@ -30,9 +30,9 @@ ohos_fuzztest("HcfVerifyCreateFuzzTest") { "-fno-omit-frame-pointer", ] sources = [ "hcfverifycreate_fuzzer.cpp" ] - deps = [ "//third_party/bounds_checking_function:libsec_shared" ] external_deps = [ + "bounds_checking_function:libsec_shared", "c_utils:utils", "crypto_framework:crypto_framework_lib", "hilog:libhilog", diff --git a/test/fuzztest/key/asykeygenerator_fuzzer/BUILD.gn b/test/fuzztest/key/asykeygenerator_fuzzer/BUILD.gn index f9921c5..6d62911 100644 --- a/test/fuzztest/key/asykeygenerator_fuzzer/BUILD.gn +++ b/test/fuzztest/key/asykeygenerator_fuzzer/BUILD.gn @@ -31,16 +31,14 @@ ohos_fuzztest("AsyKeyGeneratorFuzzTest") { "-fno-omit-frame-pointer", ] sources = [ "asykeygenerator_fuzzer.cpp" ] - deps = [ - "../../../../plugin:crypto_openssl_plugin_lib", - "//third_party/bounds_checking_function:libsec_shared", - "//third_party/openssl:libcrypto_shared", - ] + deps = [ "../../../../plugin:crypto_openssl_plugin_lib" ] external_deps = [ + "bounds_checking_function:libsec_shared", "c_utils:utils", "crypto_framework:crypto_framework_lib", "hilog:libhilog", + "openssl:libcrypto_shared", ] } diff --git a/test/fuzztest/key/dhkeyutil_fuzzer/BUILD.gn b/test/fuzztest/key/dhkeyutil_fuzzer/BUILD.gn index 58007ca..5c91360 100644 --- a/test/fuzztest/key/dhkeyutil_fuzzer/BUILD.gn +++ b/test/fuzztest/key/dhkeyutil_fuzzer/BUILD.gn @@ -32,15 +32,13 @@ ohos_fuzztest("DhKeyUtilFuzzTest") { ] sources = [ "dhkeyutil_fuzzer.cpp" ] - deps = [ - "//third_party/bounds_checking_function:libsec_shared", - "//third_party/openssl:libcrypto_shared", - ] external_deps = [ + "bounds_checking_function:libsec_shared", "c_utils:utils", "crypto_framework:crypto_framework_lib", "hilog:libhilog", + "openssl:libcrypto_shared", ] } diff --git a/test/fuzztest/key/ecckeyutil_fuzzer/BUILD.gn b/test/fuzztest/key/ecckeyutil_fuzzer/BUILD.gn index d932eb1..4ecbd1b 100644 --- a/test/fuzztest/key/ecckeyutil_fuzzer/BUILD.gn +++ b/test/fuzztest/key/ecckeyutil_fuzzer/BUILD.gn @@ -32,15 +32,13 @@ ohos_fuzztest("EccKeyUtilFuzzTest") { ] sources = [ "ecckeyutil_fuzzer.cpp" ] - deps = [ - "//third_party/bounds_checking_function:libsec_shared", - "//third_party/openssl:libcrypto_shared", - ] external_deps = [ + "bounds_checking_function:libsec_shared", "c_utils:utils", "crypto_framework:crypto_framework_lib", "hilog:libhilog", + "openssl:libcrypto_shared", ] } diff --git a/test/fuzztest/key/symkeygenerator_fuzzer/BUILD.gn b/test/fuzztest/key/symkeygenerator_fuzzer/BUILD.gn index 4bf656b..6f4a83d 100755 --- a/test/fuzztest/key/symkeygenerator_fuzzer/BUILD.gn +++ b/test/fuzztest/key/symkeygenerator_fuzzer/BUILD.gn @@ -42,15 +42,12 @@ ohos_fuzztest("SymKeyGeneratorFuzzTest") { cflags += [ "-DBINDER_IPC_32BIT" ] } - deps = [ - "//third_party/bounds_checking_function:libsec_shared", - "//third_party/openssl:libcrypto_shared", - ] - external_deps = [ + "bounds_checking_function:libsec_shared", "c_utils:utils", "crypto_framework:crypto_framework_lib", "hilog:libhilog", + "openssl:libcrypto_shared", ] } diff --git a/test/fuzztest/rand/hcfrandcreate_fuzzer/BUILD.gn b/test/fuzztest/rand/hcfrandcreate_fuzzer/BUILD.gn index 49cae7a..746fa69 100755 --- a/test/fuzztest/rand/hcfrandcreate_fuzzer/BUILD.gn +++ b/test/fuzztest/rand/hcfrandcreate_fuzzer/BUILD.gn @@ -32,9 +32,9 @@ ohos_fuzztest("HcfRandCreateFuzzTest") { "-fno-omit-frame-pointer", ] sources = [ "hcfrandcreate_fuzzer.cpp" ] - deps = [ "//third_party/bounds_checking_function:libsec_shared" ] external_deps = [ + "bounds_checking_function:libsec_shared", "c_utils:utils", "crypto_framework:crypto_framework_lib", "hilog:libhilog", diff --git a/test/unittest/BUILD.gn b/test/unittest/BUILD.gn index 096e8bf..ce508f9 100644 --- a/test/unittest/BUILD.gn +++ b/test/unittest/BUILD.gn @@ -24,8 +24,6 @@ ohos_unittest("crypto_framework_test") { include_dirs = [ "./include" ] include_dirs += [ - "//commonlibrary/c_utils/base/include", - "//third_party/openssl/include/", "../../plugin/openssl_plugin/key/asy_key_generator/src", "../../plugin/openssl_plugin/crypto_operation/signature/src", "../../interfaces/innerkits/key/", @@ -143,11 +141,7 @@ ohos_unittest("crypto_framework_test") { cflags += [ "-DBINDER_IPC_32BIT" ] } - deps = [ - "../../plugin:crypto_openssl_plugin_lib", - "//third_party/bounds_checking_function:libsec_shared", - "//third_party/openssl:libcrypto_shared", - ] + deps = [ "../../plugin:crypto_openssl_plugin_lib" ] defines = [ "HILOG_ENABLE", @@ -155,7 +149,9 @@ ohos_unittest("crypto_framework_test") { ] external_deps = [ + "bounds_checking_function:libsec_shared", "c_utils:utils", "hilog:libhilog", + "openssl:libcrypto_shared", ] }