From 1fb10c696cdde31c5fe30097cc38bbc0d054c812 Mon Sep 17 00:00:00 2001
From: "beiling.xie" <xiekunxun@huawei.com>
Date: Thu, 10 Nov 2022 10:50:33 +0800
Subject: [PATCH] remove build_configs to simplify third-party tools

Signed-off-by: beiling.xie <xiekunxun@huawei.com>
---
 config/ohos/musl.gni            |  2 +-
 core/build_scripts/make_main.sh |  2 +-
 core/gn/BUILD.gn                | 12 ------------
 ohos/notice/notice.gni          |  1 -
 4 files changed, 2 insertions(+), 15 deletions(-)

diff --git a/config/ohos/musl.gni b/config/ohos/musl.gni
index f9cead9..628e93c 100644
--- a/config/ohos/musl.gni
+++ b/config/ohos/musl.gni
@@ -17,5 +17,5 @@ if (use_musl){
   musl_sysroot = get_label_info(musl_target, "target_out_dir")
   import("//third_party/musl/musl_config.gni")
 } else {
-  musl_sysroot = ""
+  musl_sysroot = getenv("STAGING_DIR_TARGET")
 }
diff --git a/core/build_scripts/make_main.sh b/core/build_scripts/make_main.sh
index 770145c..e1168d8 100755
--- a/core/build_scripts/make_main.sh
+++ b/core/build_scripts/make_main.sh
@@ -78,7 +78,7 @@ do_make()
     if [ "${TARGET_PLATFORM}" != "" ];then
         ninja_build_args="$ninja_build_args --target-platform ${TARGET_PLATFORM}"
     fi
-    real_build_target=$(python ${BASE_HOME}/build/scripts/build_target_handler.py $ninja_build_args)
+    real_build_target="images"
     echo "build_target: "$real_build_target
 
     if [ "${USE_NARUTO}"x = "truex" ];then
diff --git a/core/gn/BUILD.gn b/core/gn/BUILD.gn
index 9c38fe4..0dc0260 100755
--- a/core/gn/BUILD.gn
+++ b/core/gn/BUILD.gn
@@ -20,9 +20,6 @@ print("root_gen_dir=$root_gen_dir")
 print("current_toolchain=$current_toolchain")
 print("host_toolchain=$host_toolchain")
 
-# load build configs and write load result to out_build_dir/build_configs
-build_loader_script = rebase_path("//build/loader/load.py")
-
 _platforms_config_file = "//out/build_configs/standard_system/platforms.build"
 
 build_platform = ""
@@ -71,15 +68,6 @@ arguments += [
   "subsystem_examples",
 ]
 
-load_result = exec_script(build_loader_script, arguments, "string")
-
-if (load_result != "") {
-  print()
-  print(load_result)
-}
-
-print("build configs generation is complete.")
-
 # gn target defined
 if (product_name == "ohos-sdk") {
   group("build_ohos_sdk") {
diff --git a/ohos/notice/notice.gni b/ohos/notice/notice.gni
index db49684..566aeb4 100755
--- a/ohos/notice/notice.gni
+++ b/ohos/notice/notice.gni
@@ -14,7 +14,6 @@
 import("//build/config/python.gni")
 import("//build/ohos/build_var.gni")
 import("//build/ohos_var.gni")
-import("${build_configs_path}/platforms_list.gni")
 
 declare_args() {
   sdk_notice_dir = "$root_build_dir/NOTICE_FILES/sdk"
-- 
2.25.1

