!135 添加Werror和Wall编译选项

Merge pull request !135 from zhao_zhen_zhou/myfeature
This commit is contained in:
openharmony_ci 2021-12-25 07:28:25 +00:00 committed by Gitee
commit e1c17bf2b4
21 changed files with 92 additions and 11 deletions

View File

@ -32,6 +32,7 @@ shared_library("cipher_shared") {
cflags = [
"-Wall",
"-Werror",
"-Wno-format",
"-Wno-format-extra-args",
]

View File

@ -18,6 +18,7 @@ shared_library("ace_kit_cipher") {
cflags = [
"-fPIC",
"-Wall",
"-Werror",
]
cflags_cc = cflags

View File

@ -38,6 +38,10 @@ ohos_static_library("libhuks_common_standard_static") {
"src/hks_param.c",
]
cflags_cc = [ "-DHILOG_ENABLE" ]
cflags = [
"-DHILOG_ENABLE",
"-Wall",
"-Werror",
]
complete_static_lib = true
}

View File

@ -28,6 +28,10 @@ ohos_static_library("libhuks_core_standard_static") {
"_HUKS_LOG_ENABLE_",
]
sources = [ "./src/hks_local_engine.c" ]
cflags = [
"-Wall",
"-Werror",
]
deps = [ "//base/security/huks/frameworks/huks_standard/main/common:libhuks_common_standard_static" ]
complete_static_lib = true
}

View File

@ -57,6 +57,10 @@ ohos_static_library("libhuks_mbedtls_standard_static") {
"//third_party/mbedtls:mbedtls_shared",
"//third_party/openssl:libcrypto_static",
]
cflags_cc = [ "-DHILOG_ENABLE" ]
cflags = [
"-DHILOG_ENABLE",
"-Wall",
"-Werror",
]
complete_static_lib = true
}

View File

@ -51,6 +51,10 @@ ohos_static_library("libhuks_openssl_standard_static") {
"//base/security/huks/frameworks/huks_standard/main/common:libhuks_common_standard_static",
"//third_party/openssl:libcrypto_static",
]
cflags_cc = [ "-DHILOG_ENABLE" ]
cflags = [
"-DHILOG_ENABLE",
"-Wall",
"-Werror",
]
complete_static_lib = true
}

View File

@ -75,6 +75,10 @@ ohos_unittest("crypto_engine_unit_test") {
"//third_party/googletest:gtest_main",
"//utils/native/base:utils",
]
cflags = [
"-Wall",
"-Werror",
]
if (use_crypto_lib == "openssl") {
deps += [ "//base/security/huks/frameworks/huks_standard/main/crypto_engine/openssl:libhuks_openssl_standard_static" ]

View File

@ -52,7 +52,11 @@ ohos_static_library("libhuks_os_dependency_standard_static") {
"ipc:ipc_core",
"samgr_standard:samgr_proxy",
]
cflags_cc = [ "-DHILOG_ENABLE" ]
cflags = [ "-DHILOG_ENABLE" ]
cflags_cc = [
"-DHILOG_ENABLE",
"-Wall",
"-Werror",
]
cflags = cflags_cc
complete_static_lib = true
}

View File

@ -29,6 +29,9 @@ ohos_shared_library("libhukssdk") {
include_dirs = [ "//utils/native/base/include" ]
sources = [ "src/hks_api.c" ]
cflags = [
"-Wall",
"-Werror",
]
deps = [ "//base/security/huks/frameworks/huks_standard/main:huks_standard_frameworks" ]
}

View File

@ -9,7 +9,7 @@
# 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.
# limitations under the License.
import("//build/test.gni")
@ -48,6 +48,11 @@ ohos_unittest("hukssdk_test") {
"//third_party/bounds_checking_function/include",
"unittest/include",
]
cflags_cc = [
"-Wall",
"-Werror",
]
cflags = cflags_cc
deps = [
"//base/security/huks/frameworks/huks_standard/main:huks_standard_frameworks",
"//base/security/huks/interfaces/innerkits/huks_standard/main:libhukssdk",

View File

@ -73,6 +73,12 @@ ohos_moduletest("huks_mt_test") {
"//base/security/huks/interfaces/innerkits/huks_standard/main/include",
"include",
]
cflags_cc = [
"-Wall",
"-Werror",
]
cflags = cflags_cc
deps = [
"//base/security/huks/frameworks/huks_standard/main:huks_standard_frameworks",
"//base/security/huks/interfaces/innerkits/huks_standard/main:libhukssdk",

View File

@ -54,6 +54,11 @@ ohos_shared_library("huks") {
deps = [ "//foundation/ace/napi:ace_napi" ]
cflags_cc = [
"-Wall",
"-Werror",
]
external_deps = [ "huks_standard:libhukssdk" ]
relative_install_dir = "module/security"

View File

@ -31,6 +31,10 @@ ohos_static_library("libhuks_engine_core_standard_static") {
"//third_party/openssl/include/",
"//base/security/huks/services/huks_standard/huks_service/main/core/include",
]
cflags = [
"-Wall",
"-Werror",
]
sources = [
"src/hks_auth.c",
"src/hks_core_service.c",

View File

@ -45,7 +45,10 @@ ohos_static_library("libhuks_service_core_standard_static") {
} else {
sources += [ "src/hks_lock.c" ]
}
cflags = [
"-Wall",
"-Werror",
]
deps = [
"//base/security/huks/frameworks/huks_standard/main:huks_standard_frameworks",
"//third_party/openssl:libcrypto_static",

View File

@ -48,6 +48,10 @@ ohos_static_library("libhuks_service_os_dependency_standard_static") {
"safwk:system_ability_fwk",
"samgr_standard:samgr_proxy",
]
cflags_cc = [
"-Wall",
"-Werror",
]
cflags = cflags_cc
complete_static_lib = true
}

View File

@ -43,6 +43,11 @@ ohos_static_library("libhuks_service_idl_standard_static") {
]
external_deps = [ "ipc:ipc_core" ]
cflags_cc = [ "-DHILOG_ENABLE" ]
cflags_cc = [
"-DHILOG_ENABLE",
"-Wall",
"-Werror",
]
cflags = cflags_cc
complete_static_lib = true
}

View File

@ -35,6 +35,12 @@ ohos_unittest("huks_multithread_test") {
"src/hks_storage_test.cpp",
]
cflags_cc = [
"-Wall",
"-Werror",
]
cflags = cflags_cc
include_dirs = [
"//base/security/huks/frameworks/huks_standard/main/common/include",
"//base/security/huks/services/huks_standard/huks_service/main/core/include",

View File

@ -20,6 +20,10 @@ ohos_moduletest("huks_fuzz_test") {
module_out_path = module_output_path
sources = [ "src/huks_fuzz_test.cpp" ]
cflags_cc = [
"-Wall",
"-Werror",
]
if (use_crypto_lib == "openssl") {
defines = [ "_USE_OPENSSL_" ]
}

View File

@ -24,6 +24,10 @@ ohos_moduletest("huks_stability_test") {
"src/api_pressure_test.cpp",
"src/pressure_test.cpp",
]
cflags_cc = [
"-Wall",
"-Werror",
]
defines = [
"L2_STANDARD",

View File

@ -46,7 +46,11 @@ static_library("huks_3.0_test_common") {
configs += [ ":huks_test_common" ]
if (ohos_kernel_type == "liteos_m") {
cflags = [ "-D_CUT_LOG_" ]
cflags = [
"-D_CUT_LOG_",
"-Wall",
"-Werror",
]
configs += [ ":hilog_lite_dir" ]
deps += [ "//base/hiviewdfx/hilog_lite/frameworks/mini:hilog_lite" ]
} else {

View File

@ -50,6 +50,8 @@ hctest_suite("huks_3.0_test") {
cflags = [
"-D_CUT_ED25519_",
"-D_CUT_LOG_",
"-Wall",
"-Werror",
]
if (disable_authenticate == true) {
cflags += [ "-D_CUT_AUTHENTICATE_" ]