1 Star 0 Fork 12

chrisshangguan/distributed-build

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0002-feat-Adapt-to-Openeuler-for-compilation.patch 21.95 KB
一键复制 编辑 原始数据 按行查看 历史
tianhang 提交于 2023-06-12 14:05 . init and add patches for openeuler build
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681
From 01b899f9d73acccd7c44d1c2e049ad63a0a312d6 Mon Sep 17 00:00:00 2001
From: peng_langyuan <peng_langyuan@hoperun.com>
Date: Thu, 18 May 2023 16:11:43 +0800
Subject: [PATCH 02/11] =?UTF-8?q?feat(Adapt=20to=20Openeuler):=E7=BC=96?=
=?UTF-8?q?=E8=AF=91=E7=9B=B8=E5=85=B3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
config/BUILDCONFIG.gn | 45 ++++-
config/compiler/compiler.gni | 3 +-
config/ohos/BUILD.gn | 3 +
core/gn/BUILD.gn | 14 +-
ohos/images/BUILD.gn | 325 ++++++++++++++++++-----------------
ohos/packages/BUILD.gn | 12 +-
ohos_var.gni | 14 ++
templates/cxx/cxx.gni | 48 ++++--
8 files changed, 275 insertions(+), 189 deletions(-)
diff --git a/config/BUILDCONFIG.gn b/config/BUILDCONFIG.gn
index ff1319b..ffff773 100755
--- a/config/BUILDCONFIG.gn
+++ b/config/BUILDCONFIG.gn
@@ -64,6 +64,20 @@ declare_args() {
device_name = ""
}
+declare_args() {
+ if (product_name == "openeuler") {
+ build_openeuler = true
+ } else {
+ build_openeuler = false
+ }
+}
+
+declare_args() {
+ if (defined(build_openeuler) && build_openeuler && !defined(product_path)) {
+ product_path = ""
+ }
+}
+
declare_args() {
preloader_output_dir = "//out/preloader/${product_name}"
}
@@ -232,10 +246,14 @@ declare_args() {
is_desktop_linux = current_os == "linux"
# Set to true when compiling with the Clang compiler.
- is_clang = current_os != "linux" ||
- (current_cpu != "s390x" && current_cpu != "s390" &&
- current_cpu != "ppc64" && current_cpu != "ppc" &&
- current_cpu != "mips" && current_cpu != "mips64")
+ if (defined(build_openeuler) && build_openeuler) {
+ is_clang = true
+ } else {
+ is_clang = current_os != "linux" ||
+ (current_cpu != "s390x" && current_cpu != "s390" &&
+ current_cpu != "ppc64" && current_cpu != "ppc" &&
+ current_cpu != "mips" && current_cpu != "mips64")
+ }
# Allows the path to a custom target toolchain to be injected as a single
# argument, and set as the default toolchain.
@@ -256,7 +274,11 @@ declare_args() {
}
declare_args() {
- use_musl = true
+ if (defined(build_openeuler) && build_openeuler) {
+ use_musl = false
+ } else {
+ use_musl = true
+ }
}
declare_args() {
@@ -309,6 +331,9 @@ declare_args() {
} else {
full_mini_debug = true
}
+ if (build_openeuler) {
+ full_mini_debug = false
+ }
}
declare_args() {
@@ -604,6 +629,11 @@ if (is_standard_system) {
"//build/config/clang:extra_warnings",
]
}
+ if (build_openeuler) {
+ default_compiler_configs += [
+ "//build/openeuler:openeuler_include_dirs",
+ ]
+ }
# Debug/release-related defines.
if (is_debug) {
@@ -612,6 +642,11 @@ if (is_standard_system) {
default_compiler_configs += [ "//build/config:release" ]
}
+ if (build_openeuler) {
+ default_compiler_configs += [
+ "//build/openeuler:openeuler_config",
+ ]
+ }
# Static libraries and source sets use only the compiler ones.
default_static_library_configs = default_compiler_configs
default_source_set_configs = default_compiler_configs
diff --git a/config/compiler/compiler.gni b/config/compiler/compiler.gni
index 254e744..d3e4a3f 100755
--- a/config/compiler/compiler.gni
+++ b/config/compiler/compiler.gni
@@ -147,7 +147,8 @@ declare_args() {
use_lld = is_clang &&
(is_win || (use_thin_lto && target_os != "chromeos") ||
(is_linux && current_cpu == "x64" && target_os != "chromeos") ||
- (is_ohos && (current_cpu != "arm" || arm_version >= 7)))
+ (is_ohos && (current_cpu != "arm" || arm_version >= 7)) ||
+ (is_linux && current_cpu == "arm64"))
}
declare_args() {
diff --git a/config/ohos/BUILD.gn b/config/ohos/BUILD.gn
index f177a03..a41763d 100755
--- a/config/ohos/BUILD.gn
+++ b/config/ohos/BUILD.gn
@@ -43,6 +43,9 @@ config("compiler") {
cflags += [ "--target=$abi_target" ]
include_dirs = [ "${musl_sysroot}/usr/include/${abi_target}" ]
+ if (build_openeuler) {
+ include_dirs += [ "//build/openeuler/compiler_include" ]
+ }
ldflags += [ "--target=$abi_target" ]
diff --git a/core/gn/BUILD.gn b/core/gn/BUILD.gn
index abec57e..e87d50d 100755
--- a/core/gn/BUILD.gn
+++ b/core/gn/BUILD.gn
@@ -56,10 +56,16 @@ if (product_name == "ohos-sdk") {
group("build_all_test_pkg") {
testonly = true
- deps = [
- "$root_build_dir/build_configs:parts_test",
- "//test/testfwk/developer_test:make_temp_test",
- ]
+ if (build_openeuler) {
+ deps = [
+ "$root_build_dir/build_configs:parts_test",
+ ]
+ } else {
+ deps = [
+ "$root_build_dir/build_configs:parts_test",
+ "//test/testfwk/developer_test:make_temp_test",
+ ]
+ }
}
group("make_test") {
diff --git a/ohos/images/BUILD.gn b/ohos/images/BUILD.gn
index 7b0d11f..ae509ea 100644
--- a/ohos/images/BUILD.gn
+++ b/ohos/images/BUILD.gn
@@ -17,188 +17,195 @@ import("//build/ohos/build_var.gni")
# import target_platform_list
import("${build_configs_path}/platforms_list.gni")
-group("make_images") {
- deps = []
- if (is_standard_system) {
- deps = [
- "//third_party/e2fsprogs:e2fsprogs_host_toolchain",
- "//third_party/f2fs-tools:f2fs-tools_host_toolchain",
- ]
- foreach(_platform, target_platform_list) {
- deps += [
- ":${_platform}_sys_prod_image",
- ":${_platform}_system_image",
- ":${_platform}_userdata_image",
- ":${_platform}_vendor_image",
+
+if (build_openeuler) {
+ group("make_images") {
+ deps = []
+ if (is_standard_system) {
+ foreach(_platform, target_platform_list) {
+ deps += [
+ "//build/ohos/packages:${_platform}_install_modules"
+ ]
+ }
+ }
+ }
+} else {
+ group("make_images") {
+ deps = []
+ if (is_standard_system) {
+ deps = [
+ "//third_party/e2fsprogs:e2fsprogs_host_toolchain",
+ "//third_party/f2fs-tools:f2fs-tools_host_toolchain",
]
- if (enable_ramdisk) {
+ foreach(_platform, target_platform_list) {
deps += [
- ":${_platform}_ramdisk_image",
- ":${_platform}_updater_ramdisk_image",
+ ":${_platform}_sys_prod_image",
+ ":${_platform}_system_image",
+ ":${_platform}_userdata_image",
+ ":${_platform}_vendor_image",
]
- } else {
- deps += [ ":${_platform}_updater_image" ]
+ if (enable_ramdisk) {
+ deps += [
+ ":${_platform}_ramdisk_image",
+ ":${_platform}_updater_ramdisk_image",
+ ]
+ } else {
+ deps += [ ":${_platform}_updater_image" ]
+ }
}
+ deps += [ ":chip_prod_image" ]
+ } else {
+ deps += [ "//build/ohos/packages:packer" ]
}
- deps += [ ":chip_prod_image" ]
- } else {
- deps += [ "//build/ohos/packages:packer" ]
}
-}
-group("chip_prod_image") {
- deps = []
- if (is_standard_system) {
- deps += [
- "//third_party/e2fsprogs:e2fsprogs_host_toolchain",
- "//third_party/f2fs-tools:f2fs-tools_host_toolchain",
- ]
- }
- foreach(_platform, target_platform_list) {
- if (chip_product_list == []) {
- deps += [ ":${_platform}_chip_prod_image" ]
- } else {
- foreach(_product, chip_product_list) {
- deps += [ ":${_platform}_${_product}_chip_prod_image" ]
+ group("chip_prod_image") {
+ deps = []
+ if (is_standard_system) {
+ deps += [
+ "//third_party/e2fsprogs:e2fsprogs_host_toolchain",
+ "//third_party/f2fs-tools:f2fs-tools_host_toolchain",
+ ]
+ }
+ foreach(_platform, target_platform_list) {
+ if (chip_product_list == []) {
+ deps += [ ":${_platform}_chip_prod_image" ]
+ } else {
+ foreach(_product, chip_product_list) {
+ deps += [ ":${_platform}_${_product}_chip_prod_image" ]
+ }
}
}
}
-}
-
-build_image_tools_path = [
- "//out/${device_name}/clang_x64/thirdparty/e2fsprogs",
- "//out/${device_name}/clang_x64/thirdparty/f2fs_tools",
- "//third_party/e2fsprogs/prebuilt/host/bin",
- "//build/ohos/images/mkimage",
-]
-foreach(_platform, target_platform_list) {
- current_platform = _platform
- current_platform_dir = "${product_output_dir}/$current_platform"
+ foreach(_platform, target_platform_list) {
+ current_platform = _platform
+ current_platform_dir = "${product_output_dir}/$current_platform"
- system_module_info_list = "${current_platform_dir}/system_module_info.json"
- system_modules_list = "${current_platform_dir}/system_modules_list.txt"
+ system_module_info_list = "${current_platform_dir}/system_module_info.json"
+ system_modules_list = "${current_platform_dir}/system_modules_list.txt"
- image_list = [
- "system",
- "vendor",
- "userdata",
- "sys_prod",
- "chip_prod",
- ]
- if (enable_ramdisk) {
- image_list += [
- "ramdisk",
- "updater_ramdisk",
+ image_list = [
+ "system",
+ "vendor",
+ "userdata",
+ "sys_prod",
+ "chip_prod",
]
- } else {
- image_list += [ "updater" ]
- }
- foreach(_image_name, image_list) {
- action_with_pydeps("${_platform}_${_image_name}_image") {
- script = "//build/ohos/images/build_image.py"
- depfile = "$target_gen_dir/$target_name.d"
- deps = [ "//build/ohos/packages:${_platform}_install_modules" ]
- if (!asan_detector) {
- deps += [ "//build/ohos/packages:high_privilege_process_validate" ]
- }
+ if (enable_ramdisk) {
+ image_list += [
+ "ramdisk",
+ "updater_ramdisk",
+ ]
+ } else {
+ image_list += [ "updater" ]
+ }
+ foreach(_image_name, image_list) {
+ action_with_pydeps("${_platform}_${_image_name}_image") {
+ script = "//build/ohos/images/build_image.py"
+ depfile = "$target_gen_dir/$target_name.d"
+ deps = [ "//build/ohos/packages:${_platform}_install_modules" ]
+ if (!asan_detector) {
+ deps += [ "//build/ohos/packages:high_privilege_process_validate" ]
+ }
- image_config_file =
- "//build/ohos/images/mkimage/${_image_name}_image_conf.txt"
- if (is_debug) {
image_config_file =
- "//build/ohos/images/mkimage/debug/${_image_name}_image_conf.txt"
- }
- device_image_config_file =
- "${product_output_dir}/imagesconf/${_image_name}_image_conf.txt"
- if (_image_name == "ramdisk" || _image_name == "updater_ramdisk") {
- output_image_file = "$root_build_dir/${_image_name}.img"
- } else {
- output_image_file = "$current_platform_dir/images/${_image_name}.img"
- }
- if (_image_name == "updater_ramdisk") {
- image_input_path = "$current_platform_dir/updater"
- } else {
- image_input_path = "$current_platform_dir/${_image_name}"
- }
- if (_image_name == "userdata") {
- image_input_path = "$current_platform_dir/data"
- }
+ "//build/ohos/images/mkimage/${_image_name}_image_conf.txt"
+ if (is_debug) {
+ image_config_file =
+ "//build/ohos/images/mkimage/debug/${_image_name}_image_conf.txt"
+ }
+ device_image_config_file =
+ "${product_output_dir}/imagesconf/${_image_name}_image_conf.txt"
+ if (_image_name == "ramdisk" || _image_name == "updater_ramdisk") {
+ output_image_file = "$root_build_dir/${_image_name}.img"
+ } else {
+ output_image_file = "$current_platform_dir/images/${_image_name}.img"
+ }
+ if (_image_name == "updater_ramdisk") {
+ image_input_path = "$current_platform_dir/updater"
+ } else {
+ image_input_path = "$current_platform_dir/${_image_name}"
+ }
+ if (_image_name == "userdata") {
+ image_input_path = "$current_platform_dir/data"
+ }
- sources = [
- image_config_file,
- system_module_info_list,
- system_modules_list,
- ]
- outputs = [ output_image_file ]
- args = [
- "--depfile",
- rebase_path(depfile, root_build_dir),
- "--image-name",
- _image_name,
- "--input-path",
- rebase_path(image_input_path, root_build_dir),
- "--image-config-file",
- rebase_path(image_config_file, root_build_dir),
- "--device-image-config-file",
- rebase_path(device_image_config_file, root_build_dir),
- "--output-image",
- rebase_path(output_image_file, root_build_dir),
- "--target-cpu",
- target_cpu,
- "--build-image-tools-path",
- ]
- args += rebase_path(build_image_tools_path, root_build_dir)
- if (sparse_image) {
- args += [ "--sparse-image" ]
+ sources = [
+ image_config_file,
+ system_module_info_list,
+ system_modules_list,
+ ]
+ outputs = [ output_image_file ]
+ args = [
+ "--depfile",
+ rebase_path(depfile, root_build_dir),
+ "--image-name",
+ _image_name,
+ "--input-path",
+ rebase_path(image_input_path, root_build_dir),
+ "--image-config-file",
+ rebase_path(image_config_file, root_build_dir),
+ "--device-image-config-file",
+ rebase_path(device_image_config_file, root_build_dir),
+ "--output-image",
+ rebase_path(output_image_file, root_build_dir),
+ "--target-cpu",
+ target_cpu,
+ "--build-image-tools-path",
+ ]
+ args += rebase_path(build_image_tools_path, root_build_dir)
+ if (sparse_image) {
+ args += [ "--sparse-image" ]
+ }
}
}
- }
- # Used to generate chip_prod images of different products
- foreach(_product, chip_product_list) {
- _image_name = "chip_prod"
- action_with_pydeps("${_platform}_${_product}_chip_prod_image") {
- script = "//build/ohos/images/build_image.py"
- depfile = "$target_gen_dir/$target_name.d"
- deps = [ "//build/ohos/packages:${_platform}_install_modules" ]
+ # Used to generate chip_prod images of different products
+ foreach(_product, chip_product_list) {
+ _image_name = "chip_prod"
+ action_with_pydeps("${_platform}_${_product}_chip_prod_image") {
+ script = "//build/ohos/images/build_image.py"
+ depfile = "$target_gen_dir/$target_name.d"
+ deps = [ "//build/ohos/packages:${_platform}_install_modules" ]
- image_config_file =
- "//build/ohos/images/mkimage/${_image_name}_image_conf.txt"
- device_image_config_file =
- "${product_output_dir}/imagesconf/${_image_name}_image_conf.txt"
- image_input_path = "${current_platform_dir}/${_image_name}/${_product}"
- output_image_file =
- "${current_platform_dir}/images/${_product}/${_image_name}.img"
+ image_config_file =
+ "//build/ohos/images/mkimage/${_image_name}_image_conf.txt"
+ device_image_config_file =
+ "${product_output_dir}/imagesconf/${_image_name}_image_conf.txt"
+ image_input_path = "${current_platform_dir}/${_image_name}/${_product}"
+ output_image_file =
+ "${current_platform_dir}/images/${_product}/${_image_name}.img"
- sources = [
- image_config_file,
- system_module_info_list,
- system_modules_list,
- ]
- outputs = [ output_image_file ]
+ sources = [
+ image_config_file,
+ system_module_info_list,
+ system_modules_list,
+ ]
+ outputs = [ output_image_file ]
- args = [
- "--depfile",
- rebase_path(depfile, root_build_dir),
- "--image-name",
- _image_name,
- "--input-path",
- rebase_path(image_input_path, root_build_dir),
- "--image-config-file",
- rebase_path(image_config_file, root_build_dir),
- "--device-image-config-file",
- rebase_path(device_image_config_file, root_build_dir),
- "--output-image",
- rebase_path(output_image_file, root_build_dir),
- "--target-cpu",
- target_cpu,
- "--build-image-tools-path",
- ]
- args += rebase_path(build_image_tools_path, root_build_dir)
- if (sparse_image) {
- args += [ "--sparse-image" ]
+ args = [
+ "--depfile",
+ rebase_path(depfile, root_build_dir),
+ "--image-name",
+ _image_name,
+ "--input-path",
+ rebase_path(image_input_path, root_build_dir),
+ "--image-config-file",
+ rebase_path(image_config_file, root_build_dir),
+ "--device-image-config-file",
+ rebase_path(device_image_config_file, root_build_dir),
+ "--output-image",
+ rebase_path(output_image_file, root_build_dir),
+ "--target-cpu",
+ target_cpu,
+ "--build-image-tools-path",
+ ]
+ args += rebase_path(build_image_tools_path, root_build_dir)
+ if (sparse_image) {
+ args += [ "--sparse-image" ]
+ }
}
}
}
-}
\ No newline at end of file
+}
diff --git a/ohos/packages/BUILD.gn b/ohos/packages/BUILD.gn
index 4915b62..847d2e8 100755
--- a/ohos/packages/BUILD.gn
+++ b/ohos/packages/BUILD.gn
@@ -591,8 +591,12 @@ group("package_testcase") {
group("build_all_test_pkg") {
testonly = true
- deps = [
- "$root_build_dir/build_configs:parts_test",
- "//test/testfwk/developer_test:make_temp_test",
- ]
+ if (build_openeuler) {
+ deps = []
+ } else {
+ deps = [
+ "$root_build_dir/build_configs:parts_test",
+ "//test/testfwk/developer_test:make_temp_test",
+ ]
+ }
}
diff --git a/ohos_var.gni b/ohos_var.gni
index b49d97e..0ba4b70 100755
--- a/ohos_var.gni
+++ b/ohos_var.gni
@@ -151,6 +151,20 @@ declare_args() {
load_test_config = true
}
+if (build_openeuler) {
+ load_test_config = false
+}
+
+declare_args() {
+ # hiviewdfx
+ enable_hiviewdfx_hisysevent = false
+ enable_hiviewdfx_hitrace = false
+ enable_hiviewdfx_hidumper = false
+
+ # security
+ enable_security_accesstoken = false
+}
+
declare_args() {
# Skip module_info generation when the packaging image is not needed
skip_gen_module_info = false
diff --git a/templates/cxx/cxx.gni b/templates/cxx/cxx.gni
index b2e4554..1c82f82 100755
--- a/templates/cxx/cxx.gni
+++ b/templates/cxx/cxx.gni
@@ -105,9 +105,11 @@ template("ohos_executable") {
])
}
- _sanitize_config_target = "${target_name}__sanitizer_config"
- ohos_sanitizer_config(_sanitize_config_target) {
- forward_variables_from(invoker, [ "sanitize" ])
+ if (defined(build_openeuler) && !build_openeuler) {
+ _sanitize_config_target = "${target_name}__sanitizer_config"
+ ohos_sanitizer_config(_sanitize_config_target) {
+ forward_variables_from(invoker, [ "sanitize" ])
+ }
}
_test_target = defined(invoker.testonly) && invoker.testonly
@@ -159,7 +161,9 @@ template("ohos_executable") {
if (defined(invoker.remove_configs)) {
configs -= invoker.remove_configs
}
- configs += [ ":$_sanitize_config_target" ]
+ if (defined(build_openeuler) && !build_openeuler) {
+ configs += [ ":$_sanitize_config_target" ]
+ }
configs += [ ":$_security_config_target" ]
if (defined(invoker.use_exceptions) && invoker.use_exceptions) {
@@ -423,9 +427,11 @@ template("ohos_shared_library") {
])
}
- _sanitize_config_target = "${target_name}__sanitizer_config"
- ohos_sanitizer_config(_sanitize_config_target) {
- forward_variables_from(invoker, [ "sanitize" ])
+ if (defined(build_openeuler) && !build_openeuler) {
+ _sanitize_config_target = "${target_name}__sanitizer_config"
+ ohos_sanitizer_config(_sanitize_config_target) {
+ forward_variables_from(invoker, [ "sanitize" ])
+ }
}
_test_target = defined(invoker.testonly) && invoker.testonly
@@ -488,7 +494,9 @@ template("ohos_shared_library") {
configs -= invoker.remove_configs
}
- configs += [ ":$_sanitize_config_target" ]
+ if (defined(build_openeuler) && !build_openeuler) {
+ configs += [ ":$_sanitize_config_target" ]
+ }
configs += [ ":$_security_config_target" ]
if (defined(invoker.use_exceptions) && invoker.use_exceptions) {
@@ -763,9 +771,11 @@ template("ohos_static_library") {
])
}
- _sanitize_config_target = "${target_name}__sanitizer_config"
- ohos_sanitizer_config(_sanitize_config_target) {
- forward_variables_from(invoker, [ "sanitize" ])
+ if (defined(build_openeuler) && !build_openeuler) {
+ _sanitize_config_target = "${target_name}__sanitizer_config"
+ ohos_sanitizer_config(_sanitize_config_target) {
+ forward_variables_from(invoker, [ "sanitize" ])
+ }
}
_test_target = defined(invoker.testonly) && invoker.testonly
@@ -811,7 +821,9 @@ template("ohos_static_library") {
if (is_standard_system) {
configs -= [ "//build/config/compiler:thin_archive" ]
}
- configs += [ ":$_sanitize_config_target" ]
+ if (defined(build_openeuler) && !build_openeuler) {
+ configs += [ ":$_sanitize_config_target" ]
+ }
configs += [ ":$_security_config_target" ]
if (defined(invoker.use_exceptions) && invoker.use_exceptions) {
@@ -935,9 +947,11 @@ template("ohos_source_set") {
])
}
- _sanitize_config_target = "${target_name}__sanitizer_config"
- ohos_sanitizer_config(_sanitize_config_target) {
- forward_variables_from(invoker, [ "sanitize" ])
+ if (defined(build_openeuler) && !build_openeuler) {
+ _sanitize_config_target = "${target_name}__sanitizer_config"
+ ohos_sanitizer_config(_sanitize_config_target) {
+ forward_variables_from(invoker, [ "sanitize" ])
+ }
}
_test_target = defined(invoker.testonly) && invoker.testonly
@@ -982,7 +996,9 @@ template("ohos_source_set") {
configs -= invoker.remove_configs
}
- configs += [ ":$_sanitize_config_target" ]
+ if (defined(build_openeuler) && !build_openeuler) {
+ configs += [ ":$_sanitize_config_target" ]
+ }
configs += [ ":$_security_config_target" ]
if (defined(invoker.use_exceptions) && invoker.use_exceptions) {
--
2.33.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/chrisshangguan/distributed-build.git
git@gitee.com:chrisshangguan/distributed-build.git
chrisshangguan
distributed-build
distributed-build
master

搜索帮助