feat:add cfi check

Signed-off-by: fangdong7 <fangdong7@huawei.com>
This commit is contained in:
fangdong7 2023-03-23 07:04:21 +00:00
parent 85396362df
commit 8eddd43fe3
10 changed files with 52 additions and 0 deletions

View File

@ -150,6 +150,11 @@ if (defined(ohos_lite)) {
}
ohos_shared_library("softbus_adapter") {
sanitize = {
cfi = true
cfi_cross_so = true
debug = true
}
include_dirs = [
"$dsoftbus_root_path/interfaces/kits",
"$dsoftbus_root_path/interfaces/kits/common",

View File

@ -93,6 +93,11 @@ config("mbedtls_config") {
}
ohos_shared_library("mbedtls_shared") {
sanitize = {
cfi = true
cfi_cross_so = true
debug = true
}
sources = mbedtls_sources
output_name = "mbedtls"
public_configs = [ ":mbedtls_config" ]

View File

@ -104,6 +104,11 @@ if (defined(ohos_lite)) {
} else {
import("//build/ohos.gni")
ohos_shared_library("FillpSo.open") {
sanitize = {
cfi = true
cfi_cross_so = true
debug = true
}
cflags = fillp_cflags
cflags += [
"-Wall",

View File

@ -69,6 +69,11 @@ if (defined(ohos_lite)) {
import("//build/ohos.gni")
ohos_shared_library("nstackx_congestion.open") {
sanitize = {
cfi = true
cfi_cross_so = true
debug = true
}
cflags = [
"-Wall",
"-DMBEDTLS_INCLUDED",

View File

@ -117,6 +117,11 @@ if (defined(ohos_lite)) {
import("//build/ohos.gni")
ohos_shared_library("nstackx_dfile.open") {
sanitize = {
cfi = true
cfi_cross_so = true
debug = true
}
cflags = [
"-Wall",
"-DMBEDTLS_INCLUDED",

View File

@ -154,6 +154,11 @@ if (defined(ohos_lite)) {
include_dirs = [ "interface" ]
}
ohos_shared_library("nstackx_ctrl") {
sanitize = {
cfi = true
cfi_cross_so = true
debug = true
}
cflags += [ "-DDFINDER_MGT_MSG_LOG" ]
cflags_cc = cflags
sources = [

View File

@ -174,6 +174,11 @@ if (defined(ohos_lite)) {
}
ohos_shared_library("nstackx_util.open") {
sanitize = {
cfi = true
cfi_cross_so = true
debug = true
}
cflags += [
"-DMBEDTLS_INCLUDED",
"-DNSTACKX_WITH_HMOS_LINUX",

View File

@ -131,6 +131,11 @@ if (defined(ohos_lite)) {
include_dirs += conn_common_inc + trans_common_inc
}
ohos_shared_library("softbus_utils") {
sanitize = {
cfi = true
cfi_cross_so = true
debug = true
}
include_dirs = [
"$dsoftbus_root_path/interfaces/kits/common",
"$dsoftbus_root_path/core/bus_center/utils/include",

View File

@ -155,6 +155,11 @@ if (defined(ohos_lite)) {
part_name = "dsoftbus"
}
ohos_shared_library("softbus_server") {
sanitize = {
cfi = true
cfi_cross_so = true
debug = true
}
defines = AUTH_SERVER_DEFINES
defines += [ "__STDC_FORMAT_MACROS" ]
include_dirs = dsoftbus_server_common_inc

View File

@ -86,6 +86,13 @@ target(build_type, "softbus_client") {
}
ldflags = [ "-lstdc++" ]
} else {
if (build_type == "ohos_shared_library") {
sanitize = {
cfi = true
cfi_cross_so = true
debug = true
}
}
version_script = "libsoftbus_client_map"
cflags = [ "-fPIC" ]
cflags_cc = [ "-std=c++14" ]