!655 修改编译选项

Merge pull request !655 from wzhhhh/master
This commit is contained in:
openharmony_ci 2024-09-03 06:54:04 +00:00 committed by Gitee
commit 430b022346
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
8 changed files with 59 additions and 1 deletions

View File

@ -27,6 +27,14 @@ config("distributed_device_profile_common_config") {
ohos_shared_library("distributed_device_profile_common") { ohos_shared_library("distributed_device_profile_common") {
branch_protector_ret = "pac_ret" branch_protector_ret = "pac_ret"
cflags = [
"-fstack-protector-strong",
"-D_FORTIFY_SOURCE=2",
"-O2",
]
cflags_cc = cflags
sanitize = { sanitize = {
boundary_sanitize = true boundary_sanitize = true
integer_overflow = true integer_overflow = true

View File

@ -30,6 +30,14 @@ config("distributed_device_profile_sdk_config") {
ohos_shared_library("distributed_device_profile_sdk") { ohos_shared_library("distributed_device_profile_sdk") {
branch_protector_ret = "pac_ret" branch_protector_ret = "pac_ret"
cflags = [
"-fstack-protector-strong",
"-D_FORTIFY_SOURCE=2",
"-O2",
]
cflags_cc = cflags
sanitize = { sanitize = {
boundary_sanitize = true boundary_sanitize = true
integer_overflow = true integer_overflow = true

View File

@ -28,6 +28,14 @@ config("distributed_device_profile_client_config") {
ohos_shared_library("distributed_device_profile_client") { ohos_shared_library("distributed_device_profile_client") {
branch_protector_ret = "pac_ret" branch_protector_ret = "pac_ret"
cflags = [
"-fstack-protector-strong",
"-D_FORTIFY_SOURCE=2",
"-O2",
]
cflags_cc = cflags
sanitize = { sanitize = {
boundary_sanitize = true boundary_sanitize = true
integer_overflow = true integer_overflow = true

View File

@ -17,6 +17,14 @@ import("//foundation/deviceprofile/device_info_manager/deviceprofile.gni")
ohos_shared_library("deviceprofileradar") { ohos_shared_library("deviceprofileradar") {
branch_protector_ret = "pac_ret" branch_protector_ret = "pac_ret"
cflags = [
"-fstack-protector-strong",
"-D_FORTIFY_SOURCE=2",
"-O2",
]
cflags_cc = cflags
sanitize = { sanitize = {
boundary_sanitize = true boundary_sanitize = true
integer_overflow = true integer_overflow = true

View File

@ -53,6 +53,14 @@ config("device_info_manager_config") {
ohos_shared_library("distributed_device_profile") { ohos_shared_library("distributed_device_profile") {
branch_protector_ret = "pac_ret" branch_protector_ret = "pac_ret"
cflags = [
"-fstack-protector-strong",
"-D_FORTIFY_SOURCE=2",
"-O2",
]
cflags_cc = cflags
sanitize = { sanitize = {
boundary_sanitize = true boundary_sanitize = true
integer_overflow = true integer_overflow = true

View File

@ -15,6 +15,16 @@ import("//build/ohos.gni")
import("//build/ohos_var.gni") import("//build/ohos_var.gni")
import("//foundation/deviceprofile/device_info_manager/deviceprofile.gni") import("//foundation/deviceprofile/device_info_manager/deviceprofile.gni")
ohos_shared_library("device_profile_radar") { ohos_shared_library("device_profile_radar") {
branch_protector_ret = "pac_ret"
cflags = [
"-fstack-protector-strong",
"-D_FORTIFY_SOURCE=2",
"-O2",
]
cflags_cc = cflags
include_dirs = [ include_dirs = [
"include", "include",
"${device_profile_common}/include/constants", "${device_profile_common}/include/constants",

View File

@ -45,6 +45,14 @@ config("device_info_manager_config") {
ohos_shared_library("distributed_device_profile_svr") { ohos_shared_library("distributed_device_profile_svr") {
branch_protector_ret = "pac_ret" branch_protector_ret = "pac_ret"
cflags = [
"-fstack-protector-strong",
"-D_FORTIFY_SOURCE=2",
"-O2",
]
cflags_cc = cflags
sanitize = { sanitize = {
boundary_sanitize = true boundary_sanitize = true
integer_overflow = true integer_overflow = true

View File

@ -63,7 +63,7 @@ int32_t RdbAdapter::Init()
int32_t RdbAdapter::UnInit() int32_t RdbAdapter::UnInit()
{ {
HILOGI("rdbAdapter unInit "); HILOGI("rdbAdapter unInit");
{ {
std::lock_guard<std::mutex> lock(rdbAdapterMtx_); std::lock_guard<std::mutex> lock(rdbAdapterMtx_);
store_ = nullptr; store_ = nullptr;