896 lines
28 KiB
Diff
896 lines
28 KiB
Diff
From 36899a1bd498e730983259e8330a006eb09ff702 Mon Sep 17 00:00:00 2001
|
|
From: zxstty <zhaojiaqi18@huawei.com>
|
|
Date: Thu, 9 Nov 2023 11:10:52 +0800
|
|
Subject: [PATCH] 0008
|
|
|
|
---
|
|
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
|
|
|