From 8ad409d1c3ad39014dced0017e8f25ade49b9d5b Mon Sep 17 00:00:00 2001 From: lijunru Date: Wed, 16 Jul 2025 11:31:44 +0800 Subject: [PATCH] Revert "Adapt ohos independent build" This reverts commit 9fd27e965e1fc8063002cee45bc20dd6d3cded1b. Change-Id: If74b9b32dc13a12d741159cd454d199cf7f34a62 --- BUILD.gn | 52 ++++------------ common_components/BUILD.gn | 7 +-- compiler_service/src/aot_args_handler.cpp | 2 +- ecmascript/compiler/BUILD.gn | 70 +++++----------------- ecmascript/js_vm/BUILD.gn | 7 +-- ecmascript/ohos/aot_tools.h | 2 +- ecmascript/ohos/jit_tools.h | 2 +- ecmascript/pgo_profiler/prof_dump/BUILD.gn | 9 +-- ecmascript/quick_fix/BUILD.gn | 7 +-- js_runtime_config.gni | 14 +---- 10 files changed, 39 insertions(+), 133 deletions(-) diff --git a/BUILD.gn b/BUILD.gn index 7a00f3610d..86272fb6fd 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -103,15 +103,6 @@ ohos_static_library("ark_js_host_linux_tools_packages") { } group("ark_js_unittest") { - testonly = true - if (defined(ohos_indep_compiler_enable) && ohos_indep_compiler_enable) { - deps = [] - } else { - deps = [ ":ark_js_unittest_suit" ] - } -} - -group("ark_js_unittest_suit") { testonly = true deps = [] @@ -309,14 +300,9 @@ config("ark_jsruntime_public_config") { "$ark_root/common_interfaces:common_interfaces_public_config", "$ark_root/libpandabase:arkbase_public_config", "$ark_root/libpandafile:arkfile_public_config", + "$ark_third_party_root/icu/icu4c:icu_config", + sdk_libc_secshared_config, ] - if (ark_standalone_build || - (defined(ohos_indep_compiler_enable) && !ohos_indep_compiler_enable)) { - configs += [ - "$ark_third_party_root/icu/icu4c:icu_config", - sdk_libc_secshared_config, - ] - } include_dirs = [ "$js_root", @@ -417,12 +403,12 @@ config("ark_jsruntime_common_config") { if (ets_runtime_enable_cmc_gc) { defines += [ "USE_CMC_GC" ] if (ets_runtime_enable_cmc_rb_dfx) { - defines += [ "ENABLE_CMC_RB_DFX" ] - print("########## ets_runtime enable cmc RB-DFX ##############") + defines += [ "ENABLE_CMC_RB_DFX" ] + print("########## ets_runtime enable cmc RB-DFX ##############") } if (ets_runtime_enable_cmc_verify) { - defines += [ "ENABLE_CMC_VERIFY" ] - print("########## ets_runtime enable cmc heap-verify ##############") + defines += [ "ENABLE_CMC_VERIFY" ] + print("########## ets_runtime enable cmc heap-verify ##############") } } else { print("########## ets_runtime disable cmc-gc ##############") @@ -1166,7 +1152,7 @@ if (!is_arkui_x) { if (current_cpu == "arm64") { ecma_source += [ "ecmascript/trampoline/aarch64/raw_asm_stub.S" ] } else if (current_cpu == "amd64" || current_cpu == "x64" || - current_cpu == "x86_64") { + current_cpu == "x86_64") { ecma_source += [ "ecmascript/trampoline/x64/raw_asm_stub.S" ] } else if (current_cpu == "arm") { ecma_source += [ "ecmascript/trampoline/arm32/raw_asm_stub.S" ] @@ -1432,10 +1418,10 @@ ohos_source_set("libcommon_components_set") { "common_components/base_runtime/base_runtime_param.cpp", "common_components/heap/heap_allocator.cpp", "common_components/heap/heap_visitor.cpp", - "common_components/profiler/heap_profiler_listener.cpp", "common_components/serialize/serialize_utils.cpp", "common_components/thread/thread_holder.cpp", "common_components/thread/thread_holder_manager.cpp", + "common_components/profiler/heap_profiler_listener.cpp", "ecmascript/dynamic_object_accessor.cpp", "ecmascript/dynamic_object_descriptor.cpp", "ecmascript/dynamic_type_converter.cpp", @@ -1461,12 +1447,7 @@ ohos_source_set("libcommon_components_set") { # hiviewdfx libraries external_deps += hiviewdfx_ext_deps deps += hiviewdfx_deps - if (defined(ohos_indep_compiler_enable) && ohos_indep_compiler_enable) { - external_deps += [ - "icu:shared_icuuc", - sdk_libc_secshared_dep, - ] - } + part_name = "ets_runtime" subsystem_name = "arkcompiler" } @@ -1589,9 +1570,6 @@ ohos_source_set("libark_jsruntime_test_set") { # hiviewdfx libraries external_deps += hiviewdfx_ext_deps deps += hiviewdfx_deps - if (defined(ohos_indep_compiler_enable) && ohos_indep_compiler_enable) { - external_deps += [ sdk_libc_secshared_dep ] - } part_name = "ets_runtime" subsystem_name = "arkcompiler" } @@ -1666,8 +1644,8 @@ config("arkjs_runtime_lto_link_config") { } if (ets_runtime_feature_enable_pgo && enable_enhanced_opt) { ldflags += [ - "-Wl,--aarch64-inline-plt", - "-Wl,-mllvm,-enable-partial-inlining", + "-Wl,--aarch64-inline-plt", + "-Wl,-mllvm,-enable-partial-inlining", ] if (ets_runtime_feature_enable_codemerge) { ldflags += [ @@ -1749,8 +1727,8 @@ ohos_shared_library("libark_jsruntime") { public_external_deps = [ "icu:shared_icui18n", "icu:shared_icuuc", - "runtime_core:arkplatform_header", "runtime_core:common_interfaces_header", + "runtime_core:arkplatform_header", ] } innerapi_tags = [ "platformsdk_indirect" ] @@ -1761,12 +1739,6 @@ ohos_shared_library("libark_jsruntime") { ":ark_jsruntime_common_config", ":arkjs_runtime_lto_link_config", ] - if (defined(ohos_indep_compiler_enable) && ohos_indep_compiler_enable) { - external_deps += [ - "runtime_core:libarkbase_static", - "runtime_core:libarkziparchive_static", - ] - } } ohos_shared_library("libark_jsruntime_test") { diff --git a/common_components/BUILD.gn b/common_components/BUILD.gn index 4361398f53..7d6a9ea24b 100755 --- a/common_components/BUILD.gn +++ b/common_components/BUILD.gn @@ -85,13 +85,12 @@ ohos_source_set("libarkcommon-runtime") { sources += source_Profiler include_dirs = [] - include_dirs += [ "./" ] + include_dirs += [ + "./", + ] # hiviewdfx libraries external_deps = hiviewdfx_ext_deps - if (defined(ohos_indep_compiler_enable) && ohos_indep_compiler_enable) { - external_deps += [ sdk_libc_secshared_dep ] - } deps = hiviewdfx_deps part_name = "ets_runtime" diff --git a/compiler_service/src/aot_args_handler.cpp b/compiler_service/src/aot_args_handler.cpp index ae304e7eeb..0b4a42f9cc 100644 --- a/compiler_service/src/aot_args_handler.cpp +++ b/compiler_service/src/aot_args_handler.cpp @@ -24,7 +24,7 @@ #include "ecmascript/log_wrapper.h" #ifdef ENABLE_COMPILER_SERVICE_GET_PARAMETER -#include "parameters.h" +#include "base/startup/init/interfaces/innerkits/include/syspara/parameters.h" #endif namespace OHOS::ArkCompiler { diff --git a/ecmascript/compiler/BUILD.gn b/ecmascript/compiler/BUILD.gn index f8fc059caa..9ebab0e9b9 100644 --- a/ecmascript/compiler/BUILD.gn +++ b/ecmascript/compiler/BUILD.gn @@ -243,12 +243,7 @@ ohos_source_set("libark_jsoptimizer_set") { # hiviewdfx libraries external_deps += hiviewdfx_ext_deps deps += hiviewdfx_deps - if (defined(ohos_indep_compiler_enable) && ohos_indep_compiler_enable) { - external_deps += [ - "icu:shared_icuuc", - sdk_libc_secshared_dep, - ] - } + part_name = "ets_runtime" subsystem_name = "arkcompiler" } @@ -322,12 +317,7 @@ ohos_source_set("libark_jsoptimizer_set_with_maple") { # hiviewdfx libraries external_deps += hiviewdfx_ext_deps - if (defined(ohos_indep_compiler_enable) && ohos_indep_compiler_enable) { - external_deps += [ - "icu:shared_icuuc", - sdk_libc_secshared_dep, - ] - } + part_name = "ets_runtime" subsystem_name = "arkcompiler" } @@ -460,14 +450,6 @@ ohos_executable("ark_stub_compiler") { ] } - if (defined(ohos_indep_compiler_enable) && ohos_indep_compiler_enable) { - external_deps += [ - "runtime_core:libarkbase_static", - "runtime_core:libarkziparchive_static", - sdk_libc_secshared_dep, - ] - } - install_enable = false part_name = "ets_runtime" subsystem_name = "arkcompiler" @@ -499,8 +481,8 @@ ohos_executable("ark_aot_compiler") { ":libark_jsoptimizer_set_with_maple", "$js_root:libark_js_intl_set", "$js_root:libark_jsruntime_set", - "$js_root:libcommon_components_set", "${MAPLEALL_ROOT}/maple_be:libcg", + "$js_root:libcommon_components_set", ] } @@ -550,12 +532,7 @@ ohos_executable("ark_aot_compiler") { deps += hiviewdfx_deps install_enable = true - if (defined(ohos_indep_compiler_enable) && ohos_indep_compiler_enable) { - external_deps += [ - "runtime_core:libarkziparchive_static", - sdk_libc_secshared_dep, - ] - } + part_name = "ets_runtime" subsystem_name = "arkcompiler" } @@ -604,35 +581,18 @@ action("gen_stub_file") { "0", "--timeout-limit", "${_timeout_}", + "--env-path", + rebase_path(root_out_dir_with_host_toolchain) + + "/arkcompiler/ets_runtime:" + + rebase_path(root_out_dir_with_host_toolchain) + + "/${icu_subsystem_name}/${icu_part_name}:" + + rebase_path(root_out_dir_with_host_toolchain) + "/thirdparty/zlib:" + + rebase_path(root_out_dir_with_host_toolchain) + + "/resourceschedule/frame_aware_sched:" + + rebase_path(root_out_dir_with_host_toolchain) + "/hiviewdfx/hilog:" + + rebase_path(root_out_dir_with_host_toolchain) + + "/thirdparty/bounds_checking_function:" + rebase_path(llvm_lib_dir), ] - if (defined(ohos_indep_compiler_enable) && ohos_indep_compiler_enable) { - args += [ - "--env-path", - rebase_path("//binarys/arkcompiler/runtime_core/") + ":" + - rebase_path("//binarys/arkcompiler/ets_frontend/") + ":" + - rebase_path("//binarys/arkcompiler/ets_runtime/") + ":" + rebase_path( - "//binarys/arkcompiler/runtime_core/innerapis/libarkziparchive_static/clang_x64/libs") + ":" + rebase_path( - "//binarys/third_party/icu/innerapis/shared_icuuc/clang_x64/libs") + ":" + rebase_path( - "//binarys/third_party/icu/innerapis/shared_icui18n/clang_x64/libs") + ":" + rebase_path( - "//binarys/third_party/zlib/innerapis/shared_libz/clang_x64/libs") + ":" + rebase_path( - "//binarys/third_party/bounds_checking_function/innerapis/libsec_shared/clang_x64/libs"), - ] - not_needed([ "llvm_lib_dir" ]) - } else { - args += [ - "--env-path", - rebase_path(root_out_dir_with_host_toolchain) + - "/arkcompiler/ets_runtime:" + - rebase_path(root_out_dir_with_host_toolchain) + - "/${icu_subsystem_name}/${icu_part_name}:" + - rebase_path(root_out_dir_with_host_toolchain) + "/thirdparty/zlib:" + - rebase_path(root_out_dir_with_host_toolchain) + - "/resourceschedule/frame_aware_sched:" + - rebase_path(root_out_dir_with_host_toolchain) + "/hiviewdfx/hilog:" + - rebase_path(root_out_dir_with_host_toolchain) + - "/thirdparty/bounds_checking_function:" + rebase_path(llvm_lib_dir), - ] - } # Use with caution. It can only be used when the IR(stub.an) logic is not modified. if (skip_gen_stub) { diff --git a/ecmascript/js_vm/BUILD.gn b/ecmascript/js_vm/BUILD.gn index 072d4662e2..6ee364674f 100644 --- a/ecmascript/js_vm/BUILD.gn +++ b/ecmascript/js_vm/BUILD.gn @@ -67,12 +67,7 @@ ohos_executable("ark_js_vm") { # hiviewdfx libraries external_deps += hiviewdfx_ext_deps deps += hiviewdfx_deps - if (defined(ohos_indep_compiler_enable) && ohos_indep_compiler_enable) { - external_deps += [ - "icu:shared_icuuc", - sdk_libc_secshared_dep, - ] - } + install_enable = false part_name = "ets_runtime" diff --git a/ecmascript/ohos/aot_tools.h b/ecmascript/ohos/aot_tools.h index fceab295b3..6e49b0d245 100644 --- a/ecmascript/ohos/aot_tools.h +++ b/ecmascript/ohos/aot_tools.h @@ -16,7 +16,7 @@ #define ECMASCRIPT_AOT_TOOLS_H #if defined(OHOS_GET_PARAMETER) -#include "parameters.h" +#include "base/startup/init/interfaces/innerkits/include/syspara/parameters.h" #endif namespace panda::ecmascript::ohos { diff --git a/ecmascript/ohos/jit_tools.h b/ecmascript/ohos/jit_tools.h index 777511368c..24ea198f82 100644 --- a/ecmascript/ohos/jit_tools.h +++ b/ecmascript/ohos/jit_tools.h @@ -20,7 +20,7 @@ #include "ecmascript/platform/aot_crash_info.h" #if defined(JIT_ESCAPE_ENABLE) || defined(GET_PARAMETER_FOR_JIT) || defined(JIT_ENABLE_CODE_SIGN) -#include "parameters.h" +#include "base/startup/init/interfaces/innerkits/include/syspara/parameters.h" #endif #if defined(JIT_ENABLE_CODE_SIGN) #include "jit_buffer_integrity.h" diff --git a/ecmascript/pgo_profiler/prof_dump/BUILD.gn b/ecmascript/pgo_profiler/prof_dump/BUILD.gn index a6008aaa3a..3028f84262 100644 --- a/ecmascript/pgo_profiler/prof_dump/BUILD.gn +++ b/ecmascript/pgo_profiler/prof_dump/BUILD.gn @@ -24,8 +24,8 @@ ohos_executable("profdump") { deps = [ "$js_root:libark_js_intl_set", "$js_root:libark_jsruntime_set", - "$js_root:libcommon_components_set", "$js_root/ecmascript/compiler:libark_mock_stub_set", + "$js_root:libcommon_components_set", ] external_deps = [ "runtime_core:arkfile_header_deps", @@ -65,12 +65,7 @@ ohos_executable("profdump") { deps += hiviewdfx_deps install_enable = true - if (defined(ohos_indep_compiler_enable) && ohos_indep_compiler_enable) { - external_deps += [ - "runtime_core:libarkziparchive_static", - sdk_libc_secshared_dep, - ] - } + part_name = "ets_runtime" subsystem_name = "arkcompiler" } diff --git a/ecmascript/quick_fix/BUILD.gn b/ecmascript/quick_fix/BUILD.gn index 8f510e95d8..921ba9319b 100644 --- a/ecmascript/quick_fix/BUILD.gn +++ b/ecmascript/quick_fix/BUILD.gn @@ -36,12 +36,7 @@ ohos_executable("quick_fix") { # hiviewdfx libraries external_deps += hiviewdfx_ext_deps deps += hiviewdfx_deps - if (defined(ohos_indep_compiler_enable) && ohos_indep_compiler_enable) { - external_deps += [ - "icu:shared_icuuc", - sdk_libc_secshared_dep, - ] - } + install_enable = false part_name = "ets_runtime" diff --git a/js_runtime_config.gni b/js_runtime_config.gni index 275b5678eb..5a14e51623 100644 --- a/js_runtime_config.gni +++ b/js_runtime_config.gni @@ -337,12 +337,7 @@ template("libark_jsruntime_common_set") { if (enable_gc_dfx_options) { defines += [ "ECMASCRIPT_ENABLE_GC_DFX_OPTIONS" ] } - if (defined(ohos_indep_compiler_enable) && ohos_indep_compiler_enable) { - external_deps += [ - "icu:shared_icuuc", - sdk_libc_secshared_dep, - ] - } + part_name = "ets_runtime" subsystem_name = "arkcompiler" } @@ -375,12 +370,7 @@ template("libark_jsruntime_intl_common_set") { # hiviewdfx libraries external_deps += hiviewdfx_ext_deps deps += hiviewdfx_deps - if (defined(ohos_indep_compiler_enable) && ohos_indep_compiler_enable) { - external_deps += [ - "icu:shared_icuuc", - sdk_libc_secshared_dep, - ] - } + part_name = "ets_runtime" subsystem_name = "arkcompiler" } -- Gitee