1 Star 0 Fork 12

yanansong/distributed-build

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0008-feat-Adapt-to-openeuler.patch 27.89 KB
一键复制 编辑 原始数据 按行查看 历史
tianhang 提交于 2023-06-12 14:05 +08:00 . init and add patches for openeuler build
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895
From ab7d96e80f3828a05b8fd8ea923d38b3d67500f4 Mon Sep 17 00:00:00 2001
From: peng_langyuan <peng_langyuan@hoperun.com>
Date: Fri, 19 May 2023 17:17:15 +0800
Subject: [PATCH 08/11] feat : Adapt to openeuler
---
build_scripts/build.sh | 27 +--
common/BUILD.gn | 10 +-
common/bundle.json | 3 +-
config/BUILDCONFIG.gn | 54 ++----
config/compiler/compiler.gni | 2 +-
config/ohos/BUILD.gn | 3 -
core/gn/BUILD.gn | 14 +-
ohos/images/BUILD.gn | 354 +++++++++++++++++------------------
ohos/packages/BUILD.gn | 12 +-
ohos_var.gni | 15 +-
templates/cxx/cxx.gni | 58 ++----
toolchain/gcc_toolchain.gni | 8 +-
toolchain/linux/BUILD.gn | 10 +-
toolchain/toolchain.gni | 3 +-
14 files changed, 244 insertions(+), 329 deletions(-)
diff --git a/build_scripts/build.sh b/build_scripts/build.sh
index 51f2e5e..dea04e9 100755
--- a/build_scripts/build.sh
+++ b/build_scripts/build.sh
@@ -109,29 +109,12 @@ case $(uname -s) in
exit $RET
esac
-args=$@
-while test $# -gt 0
-do
- case "$1" in --product-name)
- shift
- product_name=$1
- ;;
- *)
- shift
- ;;
- esac
-done
-
# set python3
-if [ "$product_name" == "openeuler" ]; then
- PYTHON3_DIR=/usr
- LLD_PATH=/usr/lib64/llvm15/bin
-else
- PYTHON3_DIR=${source_root_dir}/prebuilts/python/${HOST_DIR}/3.9.2/
- LLD_PATH=""
-fi
+# PYTHON3_DIR=${source_root_dir}/prebuilts/python/${HOST_DIR}/3.9.2/
+PYTHON3_DIR=/usr
PYTHON3=${PYTHON3_DIR}/bin/python3
PYTHON=${PYTHON3_DIR}/bin/python
+LLVM=/usr/lib64/llvm15/bin
if [[ ! -f "${PYTHON3}" ]]; then
echo -e "\033[33m Please execute the build/prebuilts_download.sh \033[0m"
exit 1
@@ -141,11 +124,11 @@ else
fi
fi
-export PATH=${source_root_dir}/prebuilts/build-tools/${HOST_DIR}/bin:${PYTHON3_DIR}/bin:${LLD_PATH}:$PATH
+export PATH=${source_root_dir}/prebuilts/build-tools/${HOST_DIR}/bin:${PYTHON3_DIR}/bin:${LLVM}:$PATH
${PYTHON3} ${source_root_dir}/build/scripts/tools_checker.py
-${PYTHON3} ${source_root_dir}/build/scripts/entry.py --source-root-dir ${source_root_dir} $args
+${PYTHON3} ${source_root_dir}/build/scripts/entry.py --source-root-dir ${source_root_dir} $@
if [[ "$?" -ne 0 ]]; then
echo -e "\033[31m=====build ${product_name} error=====\033[0m"
diff --git a/common/BUILD.gn b/common/BUILD.gn
index 1a0ac2f..4daf6bd 100755
--- a/common/BUILD.gn
+++ b/common/BUILD.gn
@@ -25,9 +25,9 @@ group("common_packages") {
}
deps = [ "//third_party/sqlite:sqlite" ]
- deps += [ "musl:musl_install" ]
+ # deps += [ "musl:musl_install" ]
- deps += [ "asan:libclang_rt.asan.so" ]
+ # deps += [ "asan:libclang_rt.asan.so" ]
if (is_asan) {
deps += [
@@ -38,9 +38,9 @@ group("common_packages") {
} else {
# ubsan.cfg defines the log_path, different with asan.cfg
deps += [
- "ubsan:libclang_rt.ubsan_minimal.so",
- "ubsan:libclang_rt.ubsan_standalone.so",
- "ubsan:ubsan.cfg",
+ # "ubsan:libclang_rt.ubsan_minimal.so",
+ # "ubsan:libclang_rt.ubsan_standalone.so",
+ # "ubsan:ubsan.cfg",
]
}
}
diff --git a/common/bundle.json b/common/bundle.json
index c329e14..6104fcf 100644
--- a/common/bundle.json
+++ b/common/bundle.json
@@ -11,8 +11,7 @@
"deps": {},
"build": {
"sub_component": [
- "//build/common:common_packages",
- "//third_party/f2fs-tools:f2fs-tools_host_toolchain"
+ "//build/common:common_packages"
]
}
}
diff --git a/config/BUILDCONFIG.gn b/config/BUILDCONFIG.gn
index ffff773..280894e 100755
--- a/config/BUILDCONFIG.gn
+++ b/config/BUILDCONFIG.gn
@@ -65,25 +65,22 @@ declare_args() {
}
declare_args() {
- if (product_name == "openeuler") {
- build_openeuler = true
- } else {
- build_openeuler = false
- }
+ preloader_output_dir = "//out/preloader/${product_name}"
}
declare_args() {
- if (defined(build_openeuler) && build_openeuler && !defined(product_path)) {
- product_path = ""
- }
+ enable_lto_O0 = false
}
declare_args() {
- preloader_output_dir = "//out/preloader/${product_name}"
-}
+ if (!defined(product_path)) {
+ product_path = ""
+ }
+ enable_hiviewdfx_hisysevent = false
+ enable_hiviewdfx_hitrace = false
+ enable_hiviewdfx_hidumper = false
-declare_args() {
- enable_lto_O0 = false
+ enable_security_accesstoken = false
}
product_build_config =
@@ -246,14 +243,10 @@ declare_args() {
is_desktop_linux = current_os == "linux"
# Set to true when compiling with the Clang compiler.
- 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")
- }
+ 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.
@@ -274,11 +267,8 @@ declare_args() {
}
declare_args() {
- if (defined(build_openeuler) && build_openeuler) {
- use_musl = false
- } else {
- use_musl = true
- }
+ # use_musl = true
+ use_musl = false
}
declare_args() {
@@ -329,9 +319,7 @@ declare_args() {
if (host_os == "mac" && host_cpu == "arm64") {
full_mini_debug = false
} else {
- full_mini_debug = true
- }
- if (build_openeuler) {
+ # full_mini_debug = true
full_mini_debug = false
}
}
@@ -627,11 +615,8 @@ if (is_standard_system) {
default_compiler_configs += [
"//build/config/clang:find_bad_constructs",
"//build/config/clang:extra_warnings",
- ]
- }
- if (build_openeuler) {
- default_compiler_configs += [
"//build/openeuler:openeuler_include_dirs",
+ "//build/openeuler:openeuler_config",
]
}
@@ -642,11 +627,6 @@ 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 d3e4a3f..766a9d8 100755
--- a/config/compiler/compiler.gni
+++ b/config/compiler/compiler.gni
@@ -146,7 +146,7 @@ declare_args() {
# Linux.
use_lld = is_clang &&
(is_win || (use_thin_lto && target_os != "chromeos") ||
- (is_linux && current_cpu == "x64" && target_os != "chromeos") ||
+ (is_linux && (current_cpu == "x64" || current_cpu == "arm64") && target_os != "chromeos") ||
(is_ohos && (current_cpu != "arm" || arm_version >= 7)) ||
(is_linux && current_cpu == "arm64"))
}
diff --git a/config/ohos/BUILD.gn b/config/ohos/BUILD.gn
index a41763d..f177a03 100755
--- a/config/ohos/BUILD.gn
+++ b/config/ohos/BUILD.gn
@@ -43,9 +43,6 @@ 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 e87d50d..8344335 100755
--- a/core/gn/BUILD.gn
+++ b/core/gn/BUILD.gn
@@ -56,16 +56,10 @@ if (product_name == "ohos-sdk") {
group("build_all_test_pkg") {
testonly = true
- 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",
- ]
- }
+ 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 ae509ea..813c89a 100644
--- a/ohos/images/BUILD.gn
+++ b/ohos/images/BUILD.gn
@@ -18,194 +18,192 @@ import("//build/ohos/build_var.gni")
# import target_platform_list
import("${build_configs_path}/platforms_list.gni")
-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",
- ]
- foreach(_platform, target_platform_list) {
- deps += [
- ":${_platform}_sys_prod_image",
- ":${_platform}_system_image",
- ":${_platform}_userdata_image",
- ":${_platform}_vendor_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" ]
- }
- }
+# 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 (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" ]
+# }
+# }
- 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" ]
+# }
+# }
+# }
+# }
- 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",
- ]
- } 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_list = [
+# "system",
+# "vendor",
+# "userdata",
+# "sys_prod",
+# "chip_prod",
+# ]
+# 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"
- }
+# 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"
+# }
- 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" ]
+# }
+# }
+# }
+# }
+
+group("make_images") {
+ deps = []
+ if (is_standard_system) {
+ foreach(_platform, target_platform_list) {
+ deps += [
+ "//build/ohos/packages:${_platform}_install_modules"
+ ]
}
}
}
diff --git a/ohos/packages/BUILD.gn b/ohos/packages/BUILD.gn
index 847d2e8..18a5ee3 100755
--- a/ohos/packages/BUILD.gn
+++ b/ohos/packages/BUILD.gn
@@ -591,12 +591,8 @@ group("package_testcase") {
group("build_all_test_pkg") {
testonly = true
- if (build_openeuler) {
- deps = []
- } else {
- deps = [
- "$root_build_dir/build_configs:parts_test",
- "//test/testfwk/developer_test:make_temp_test",
- ]
- }
+ 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 0ba4b70..1e94387 100755
--- a/ohos_var.gni
+++ b/ohos_var.gni
@@ -148,23 +148,10 @@ declare_args() {
}
declare_args() {
- load_test_config = true
-}
-
-if (build_openeuler) {
+ # load_test_config = true
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 1c82f82..a937643 100755
--- a/templates/cxx/cxx.gni
+++ b/templates/cxx/cxx.gni
@@ -105,12 +105,10 @@ template("ohos_executable") {
])
}
- if (defined(build_openeuler) && !build_openeuler) {
- _sanitize_config_target = "${target_name}__sanitizer_config"
- ohos_sanitizer_config(_sanitize_config_target) {
- forward_variables_from(invoker, [ "sanitize" ])
- }
- }
+ # _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
if (!_test_target) {
@@ -161,9 +159,7 @@ template("ohos_executable") {
if (defined(invoker.remove_configs)) {
configs -= invoker.remove_configs
}
- if (defined(build_openeuler) && !build_openeuler) {
- configs += [ ":$_sanitize_config_target" ]
- }
+ # configs += [ ":$_sanitize_config_target" ]
configs += [ ":$_security_config_target" ]
if (defined(invoker.use_exceptions) && invoker.use_exceptions) {
@@ -427,12 +423,10 @@ template("ohos_shared_library") {
])
}
- if (defined(build_openeuler) && !build_openeuler) {
- _sanitize_config_target = "${target_name}__sanitizer_config"
- ohos_sanitizer_config(_sanitize_config_target) {
- forward_variables_from(invoker, [ "sanitize" ])
- }
- }
+ # _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
if (!_test_target) {
@@ -493,10 +487,7 @@ template("ohos_shared_library") {
if (defined(invoker.remove_configs)) {
configs -= invoker.remove_configs
}
-
- if (defined(build_openeuler) && !build_openeuler) {
- configs += [ ":$_sanitize_config_target" ]
- }
+ # configs += [ ":$_sanitize_config_target" ]
configs += [ ":$_security_config_target" ]
if (defined(invoker.use_exceptions) && invoker.use_exceptions) {
@@ -771,12 +762,10 @@ template("ohos_static_library") {
])
}
- if (defined(build_openeuler) && !build_openeuler) {
- _sanitize_config_target = "${target_name}__sanitizer_config"
- ohos_sanitizer_config(_sanitize_config_target) {
- forward_variables_from(invoker, [ "sanitize" ])
- }
- }
+ # _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
if (!_test_target) {
@@ -821,9 +810,7 @@ template("ohos_static_library") {
if (is_standard_system) {
configs -= [ "//build/config/compiler:thin_archive" ]
}
- if (defined(build_openeuler) && !build_openeuler) {
- configs += [ ":$_sanitize_config_target" ]
- }
+ # configs += [ ":$_sanitize_config_target" ]
configs += [ ":$_security_config_target" ]
if (defined(invoker.use_exceptions) && invoker.use_exceptions) {
@@ -947,12 +934,10 @@ template("ohos_source_set") {
])
}
- if (defined(build_openeuler) && !build_openeuler) {
- _sanitize_config_target = "${target_name}__sanitizer_config"
- ohos_sanitizer_config(_sanitize_config_target) {
- forward_variables_from(invoker, [ "sanitize" ])
- }
- }
+ # _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
if (!_test_target) {
@@ -995,10 +980,7 @@ template("ohos_source_set") {
if (defined(invoker.remove_configs)) {
configs -= invoker.remove_configs
}
-
- if (defined(build_openeuler) && !build_openeuler) {
- configs += [ ":$_sanitize_config_target" ]
- }
+ # configs += [ ":$_sanitize_config_target" ]
configs += [ ":$_security_config_target" ]
if (defined(invoker.use_exceptions) && invoker.use_exceptions) {
diff --git a/toolchain/gcc_toolchain.gni b/toolchain/gcc_toolchain.gni
index f521d7c..0c91ccf 100755
--- a/toolchain/gcc_toolchain.gni
+++ b/toolchain/gcc_toolchain.gni
@@ -584,12 +584,8 @@ template("clang_toolchain") {
}
gcc_toolchain(target_name) {
- if (build_openeuler) {
- prefix = "/usr/bin"
- toolprefix = "/usr/bin/"
- } else {
- prefix = rebase_path("$clang_base_path/bin", root_build_dir)
- }
+ # prefix = rebase_path("$clang_base_path/bin", root_build_dir)
+ prefix = "/usr/bin"
cc = "$prefix/clang"
cxx = "$prefix/clang++"
ld = cxx
diff --git a/toolchain/linux/BUILD.gn b/toolchain/linux/BUILD.gn
index 59449f6..353b13d 100755
--- a/toolchain/linux/BUILD.gn
+++ b/toolchain/linux/BUILD.gn
@@ -120,29 +120,31 @@ gcc_toolchain("x64") {
clang_toolchain("linux_clang_x86_64") {
# Output linker map files for binary size analysis.
enable_linker_map = true
-
+ toolprefix = "/usr/bin/"
strip = "/usr/bin/llvm-strip"
toolchain_args = {
current_cpu = "x64"
current_os = "linux"
}
- shlib_extension = ".so"
+ shlib_extension = ".z.so"
}
clang_toolchain("clang_x86_64") {
# Output linker map files for binary size analysis.
enable_linker_map = true
-
+ toolprefix = "/usr/bin/"
strip = "/usr/bin/llvm-strip"
toolchain_args = {
current_cpu = "x64"
current_os = "linux"
}
- shlib_extension = ".so"
+ shlib_extension = ".z.so"
}
clang_toolchain("linux_clang_arm64") {
+ toolprefix = "/usr/bin/"
toolchain_args = {
current_cpu = "arm64"
current_os = "linux"
}
+ shlib_extension = ".z.so"
}
diff --git a/toolchain/toolchain.gni b/toolchain/toolchain.gni
index a079f0f..1e95b63 100755
--- a/toolchain/toolchain.gni
+++ b/toolchain/toolchain.gni
@@ -68,7 +68,8 @@ if (is_mac) {
shlib_extension = ".dll"
executable_extension = ".exe"
} else if (is_posix) {
- shlib_extension = ".so"
+ # shlib_extension = ".so"
+ shlib_extension = ".z.so"
} else if (is_win) {
shlib_extension = ".dll"
} else {
--
2.33.0
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/yanansong/distributed-build.git
git@gitee.com:yanansong/distributed-build.git
yanansong
distributed-build
distributed-build
master

搜索帮助