5.0 component improvement

Signed-off-by: ah <liangahui@h-partners.com>
This commit is contained in:
ah 2024-03-23 15:44:27 +08:00
parent 9b71a82c96
commit b10fa48f09
21 changed files with 131 additions and 73 deletions

View File

@ -40,15 +40,13 @@ ark_enable_global_register_variables = true
enable_bytecode_optimizer = true
enable_relayout_profile = false
sdk_libc_secshared_dep =
"$ark_third_party_root/bounds_checking_function:libsec_shared"
sdk_libc_secshared_dep = "bounds_checking_function:libsec_shared"
sdk_libc_secshared_config =
"$ark_third_party_root/bounds_checking_function:libsec_public_config"
if (is_mingw || is_mac || is_linux || target_os == "ios" ||
target_os == "android") {
sdk_libc_secshared_dep =
"$ark_third_party_root/bounds_checking_function:libsec_static"
sdk_libc_secshared_dep = "bounds_checking_function:libsec_static"
}
is_mob = !ark_standalone_build && !is_standard_system &&

View File

@ -28,10 +28,12 @@ host_unittest_action("ArkplatformTest") {
deps = [
"$ark_root/arkplatform:libarkplatform",
"$ark_third_party_root/icu/icu4c:shared_icui18n",
sdk_libc_secshared_dep,
]
external_deps = [ "ets_runtime:libark_jsruntime" ]
external_deps = [
"ets_runtime:libark_jsruntime",
sdk_libc_secshared_dep,
]
}
group("unittest") {

View File

@ -17,7 +17,6 @@ config("arkassembler_public_config") {
"$target_gen_dir",
"$target_gen_dir/include",
"$root_gen_dir/libpandabase",
"$ark_root",
"$ark_root/plugins/ecmascript/assembler",
]
@ -40,7 +39,6 @@ libarkassembler_sources = [
]
libarkassembler_configs = [
sdk_libc_secshared_config,
"$ark_root:ark_config",
":arkassembler_public_config",
"$ark_root/libpandabase:arkbase_public_config",
@ -67,7 +65,7 @@ foreach(plugin, enabled_plugins) {
source_files = []
}
source_set("libarkassembler_static") {
ohos_static_library("libarkassembler_static") {
sources = libarkassembler_sources
public_configs = libarkassembler_configs
@ -83,10 +81,14 @@ source_set("libarkassembler_static") {
":isa_gen_libarkassembler_operand_types_print_h",
"$ark_root/libpandabase:libarkbase_static",
"$ark_root/libpandafile:libarkfile_static",
sdk_libc_secshared_dep,
]
external_deps = [ sdk_libc_secshared_dep ]
deps += plugin_deps
part_name = "runtime_core"
subsystem_name = "arkcompiler"
}
ohos_shared_library("libarkassembler") {
@ -105,7 +107,7 @@ ohos_shared_library("libarkassembler") {
subsystem_name = "arkcompiler"
}
source_set("libarkassembler_frontend_set_static") {
ohos_source_set("libarkassembler_frontend_set_static") {
sources = libarkassembler_sources
public_configs = libarkassembler_configs
@ -121,10 +123,14 @@ source_set("libarkassembler_frontend_set_static") {
":isa_gen_libarkassembler_operand_types_print_h",
"$ark_root/libpandabase:libarkbase_frontend_static",
"$ark_root/libpandafile:libarkfile_frontend_static",
sdk_libc_secshared_dep,
]
external_deps = [ sdk_libc_secshared_dep ]
deps += plugin_deps
part_name = "runtime_core"
subsystem_name = "arkcompiler"
}
ohos_static_library("libarkassembler_frontend_static") {
@ -135,7 +141,7 @@ ohos_static_library("libarkassembler_frontend_static") {
subsystem_name = "arkcompiler"
}
source_set("ark_asm_static") {
ohos_source_set("ark_asm_static") {
sources = [ "pandasm.cpp" ]
include_dirs = [
@ -144,7 +150,6 @@ source_set("ark_asm_static") {
]
public_configs = [
sdk_libc_secshared_config,
":arkassembler_public_config",
"$ark_root:ark_config",
"$ark_root/libpandabase:arkbase_public_config",
@ -157,10 +162,15 @@ source_set("ark_asm_static") {
"$ark_root/libpandafile:libarkfile_frontend_static",
]
external_deps = [ sdk_libc_secshared_dep ]
libs = platform_libs
if (!is_mac && !is_mingw) {
ldflags = platform_ldflags
}
part_name = "runtime_core"
subsystem_name = "arkcompiler"
}
ohos_executable("ark_asm") {

View File

@ -62,8 +62,9 @@ host_unittest_action("AssemblerTest") {
"$ark_root/libpandafile:libarkfile",
"$ark_root/libziparchive:libarkziparchive",
"//third_party/googletest:gtest_main",
sdk_libc_secshared_dep,
]
external_deps = [ sdk_libc_secshared_dep ]
}
group("host_unittest") {

View File

@ -17,8 +17,8 @@
#include <string>
#include <gtest/gtest.h>
#include "../define.h"
#include "../lexer.h"
#include "define.h"
#include "lexer.h"
using namespace panda::pandasm;

View File

@ -79,6 +79,13 @@
"header_base": "//arkcompiler/runtime_core/assembler"
}
},
{
"name": "//arkcompiler/runtime_core/assembler:libarkassembler_static",
"header": {
"header_files": [],
"header_base": "//arkcompiler/runtime_core/assembler"
}
},
{
"name": "//arkcompiler/runtime_core/libpandabase:libarkbase_frontend_static",
"header": {

View File

@ -32,7 +32,6 @@ libarkbytecodeopt_sources = [
]
libarkbytecodeopt_configs = [
sdk_libc_secshared_config,
"$ark_root:ark_config",
":bytecodeopt_public_config",
"$ark_root/compiler:arkcompiler_public_config",
@ -60,9 +59,10 @@ ohos_shared_library("libarkbytecodeopt") {
"$ark_root/compiler:libarkcompiler",
"$ark_root/libpandabase:libarkbase",
"$ark_root/libpandafile:libarkfile",
sdk_libc_secshared_dep,
]
external_deps = [ sdk_libc_secshared_dep ]
relative_install_dir = "ark"
output_extension = "so"
part_name = "runtime_core"
@ -88,9 +88,10 @@ ohos_static_library("libarkbytecodeopt_frontend_static") {
"$ark_root/compiler:libarkcompiler_frontend_static",
"$ark_root/libpandabase:libarkbase_frontend_static",
"$ark_root/libpandafile:libarkfile_frontend_static",
sdk_libc_secshared_dep,
]
external_deps = [ sdk_libc_secshared_dep ]
part_name = "runtime_core"
subsystem_name = "arkcompiler"
}

View File

@ -34,7 +34,6 @@ bcopt_test_deps = [
"$ark_root/libpandabase:libarkbase",
"$ark_root/libpandafile:libarkfile",
"$ark_root/libziparchive:libarkziparchive",
sdk_libc_secshared_dep,
]
test_js_path = "//arkcompiler/runtime_core/bytecode_optimizer/tests/js/"
@ -67,6 +66,7 @@ host_unittest_action("BytecodeOptimizerTest") {
]
configs = bcopt_test_config
deps = bcopt_test_deps
external_deps = [ sdk_libc_secshared_dep ]
test_abc_dir = rebase_path(target_out_dir)
defines = [ "GRAPH_TEST_ABC_DIR=\"${test_abc_dir}/\"" ]

View File

@ -81,7 +81,6 @@ libarkcompiler_sources = [
libarkcompiler_sources += [ "$target_gen_dir/generated/inst_builder_gen.cpp" ]
libarkcompiler_configs = [
sdk_libc_secshared_config,
":arkcompiler_public_config",
"$ark_root:ark_config",
"$ark_root/libpandabase:arkbase_public_config",
@ -134,9 +133,10 @@ ohos_shared_library("libarkcompiler") {
"$ark_root/libpandafile:isa_gen_libarkfile_bytecode_instruction_enum_gen_h",
"$ark_root/libpandafile:libarkfile",
"$ark_root/libpandafile:libarkfile_type_gen_h",
sdk_libc_secshared_dep,
]
external_deps = [ sdk_libc_secshared_dep ]
include_dirs = [ "$ark_root/compiler/optimizer" ]
output_extension = "so"
@ -185,7 +185,6 @@ libarkcompiler_frontend_static_common_deps = [
"$ark_root/libpandafile:isa_gen_libarkfile_bytecode_instruction_enum_gen_h",
"$ark_root/libpandafile:libarkfile_frontend_static",
"$ark_root/libpandafile:libarkfile_type_gen_h",
sdk_libc_secshared_dep,
]
ohos_static_library("libarkcompiler_frontend_static") {
@ -196,6 +195,8 @@ ohos_static_library("libarkcompiler_frontend_static") {
deps = libarkcompiler_frontend_static_common_deps
external_deps = [ sdk_libc_secshared_dep ]
include_dirs = [ "$ark_root/compiler/optimizer" ]
part_name = "runtime_core"
@ -213,6 +214,8 @@ ohos_static_library(
deps = libarkcompiler_frontend_static_common_deps
external_deps = [ sdk_libc_secshared_dep ]
include_dirs = [ "$ark_root/compiler/optimizer" ]
part_name = "runtime_core"

View File

@ -31,7 +31,6 @@ compiler_test_deps = [
"$ark_root/compiler:libarkcompiler",
"$ark_root/libpandabase:libarkbase",
"$ark_root/libpandafile:libarkfile",
sdk_libc_secshared_dep,
]
test_js_path = "//arkcompiler/runtime_core/compiler/tests/js/"
@ -80,6 +79,8 @@ host_unittest_action("GraphInterfaceTest") {
configs = compiler_test_configs
deps = compiler_test_deps
external_deps = [ sdk_libc_secshared_dep ]
test_abc_dir = rebase_path(target_out_dir)
defines = [ "GRAPH_TEST_ABC_DIR=\"${test_abc_dir}/\"" ]
@ -95,6 +96,8 @@ host_unittest_action("DrawCfgToolTest") {
configs = compiler_test_configs
deps = compiler_test_deps
external_deps = [ sdk_libc_secshared_dep ]
test_abc_dir = rebase_path(target_out_dir)
tools_dir = rebase_path("$ark_root/compiler/tools")

View File

@ -26,7 +26,6 @@ arkdisassembler_sources = [
]
arkdisassembler_configs = [
sdk_libc_secshared_config,
":arkdisassembler_public_config",
"$ark_root:ark_config",
"$ark_root/libpandabase:arkbase_public_config",
@ -72,9 +71,10 @@ ohos_shared_library("arkdisassembler") {
"$ark_root/assembler:libarkassembler",
"$ark_root/libpandabase:libarkbase",
"$ark_root/libpandafile:libarkfile",
sdk_libc_secshared_dep,
]
external_deps = [ sdk_libc_secshared_dep ]
if (!is_standard_system) {
relative_install_dir = "ark"
}
@ -108,8 +108,8 @@ ohos_static_library("arkdisassembler_frontend_static") {
"$ark_root/assembler:libarkassembler_frontend_static",
"$ark_root/libpandabase:libarkbase_frontend_static",
"$ark_root/libpandafile:libarkfile_frontend_static",
sdk_libc_secshared_dep,
]
external_deps = [ sdk_libc_secshared_dep ]
part_name = "runtime_core"
subsystem_name = "arkcompiler"
@ -124,7 +124,6 @@ ohos_executable("ark_disasm") {
]
configs = [
sdk_libc_secshared_config,
"$ark_root:ark_config",
"$ark_root/assembler:arkassembler_public_config",
"$ark_root/libpandabase:arkbase_public_config",
@ -138,6 +137,8 @@ ohos_executable("ark_disasm") {
"$ark_root/libpandafile:libarkfile_frontend_static",
]
external_deps = [ sdk_libc_secshared_dep ]
libs = platform_libs
if (!is_mac && !is_mingw) {
ldflags = platform_ldflags

View File

@ -68,9 +68,10 @@ ohos_shared_library("libark_defect_scan_aux") {
"$ark_root/compiler:libarkcompiler_frontend_static_for_libark_defect_scan_aux",
"$ark_root/libpandabase:libarkbase_frontend_static",
"$ark_root/libpandafile:libarkfile_frontend_static",
sdk_libc_secshared_dep,
]
external_deps = [ sdk_libc_secshared_dep ]
output_extension = "so"
relative_install_dir = "ark"
part_name = "runtime_core"
@ -88,9 +89,10 @@ ohos_static_library("libark_defect_scan_aux_static_test") {
"$ark_root/compiler:libarkcompiler_frontend_static_for_libark_defect_scan_aux",
"$ark_root/libpandabase:libarkbase_frontend_static",
"$ark_root/libpandafile:libarkfile_frontend_static",
sdk_libc_secshared_dep,
]
external_deps = [ sdk_libc_secshared_dep ]
part_name = "runtime_core"
subsystem_name = "arkcompiler"
}

View File

@ -48,10 +48,10 @@ host_unittest_action("LibArkDefectScanAuxTest") {
sources = [ "defect_scan_aux_test.cpp" ]
configs = [ "$ark_root/libark_defect_scan_aux:defectscanaux_test_config" ]
deps = [
"$ark_root/libark_defect_scan_aux:libark_defect_scan_aux_static_test",
sdk_libc_secshared_dep,
]
deps =
[ "$ark_root/libark_defect_scan_aux:libark_defect_scan_aux_static_test" ]
external_deps = [ sdk_libc_secshared_dep ]
test_abc_dir = rebase_path(target_out_dir)
@ -87,10 +87,10 @@ host_unittest_action("LibArkDefectScanAuxMergeTest") {
sources = [ "defect_scan_aux_merge_test.cpp" ]
configs = [ "$ark_root/libark_defect_scan_aux:defectscanaux_test_config" ]
deps = [
"$ark_root/libark_defect_scan_aux:libark_defect_scan_aux_static_test",
sdk_libc_secshared_dep,
]
deps =
[ "$ark_root/libark_defect_scan_aux:libark_defect_scan_aux_static_test" ]
external_deps = [ sdk_libc_secshared_dep ]
print("target_out_dir", target_out_dir)
target_dir = rebase_path(target_out_dir)
@ -118,10 +118,10 @@ ohos_executable("defect_scan_aux_demo") {
configs = [ "$ark_root/libark_defect_scan_aux:defectscanaux_test_config" ]
deps = [
"$ark_root/libark_defect_scan_aux:libark_defect_scan_aux_static_test",
sdk_libc_secshared_dep,
]
deps =
[ "$ark_root/libark_defect_scan_aux:libark_defect_scan_aux_static_test" ]
external_deps = [ sdk_libc_secshared_dep ]
part_name = "runtime_core"
subsystem_name = "arkcompiler"

View File

@ -173,18 +173,20 @@ group("arkbase_header_deps") {
]
}
libarkbase_deps = [
":arkbase_header_deps",
sdk_libc_secshared_dep,
]
libarkbase_deps = [ ":arkbase_header_deps" ]
source_set("libarkbase_static_fuzz") {
ohos_source_set("libarkbase_static_fuzz") {
sources = libarkbase_sources
public_configs = libarkbase_configs
public_configs += [ ":arkbase_fuzz_config" ]
deps = libarkbase_deps
external_deps = [ sdk_libc_secshared_dep ]
part_name = "runtime_core"
subsystem_name = "arkcompiler"
}
ohos_source_set("libarkbase_static") {
@ -193,6 +195,9 @@ ohos_source_set("libarkbase_static") {
public_configs = libarkbase_configs
deps = libarkbase_deps
external_deps = [ sdk_libc_secshared_dep ]
external_deps = []
if (enable_hilog) {
external_deps += [ "hilog:libhilog" ]
@ -204,6 +209,7 @@ ohos_source_set("libarkbase_static") {
ohos_shared_library("libarkbase") {
stack_protector_ret = false
deps = [ ":libarkbase_static" ]
external_deps = [ sdk_libc_secshared_dep ]
if (!is_mingw && !is_mac) {
output_extension = "so"
}
@ -214,12 +220,17 @@ ohos_shared_library("libarkbase") {
subsystem_name = "arkcompiler"
}
source_set("libarkbase_frontend_set_static") {
ohos_source_set("libarkbase_frontend_set_static") {
sources = libarkbase_sources
public_configs = libarkbase_configs
deps = libarkbase_deps
external_deps = [ sdk_libc_secshared_dep ]
part_name = "runtime_core"
subsystem_name = "arkcompiler"
}
ohos_static_library("libarkbase_frontend_static") {

View File

@ -57,10 +57,9 @@ host_unittest_action("LibPandaBaseTest") {
sdk_libc_secshared_config,
]
deps = [
"$ark_root/libpandabase:libarkbase_static",
sdk_libc_secshared_dep,
]
deps = [ "$ark_root/libpandabase:libarkbase_static" ]
external_deps = [ sdk_libc_secshared_dep ]
}
group("unittest") {

View File

@ -82,7 +82,7 @@ group("arkfile_header_deps") {
]
}
source_set("libarkfile_static") {
ohos_source_set("libarkfile_static") {
sources = libarkfile_sources
public_configs = libarkfile_configs
@ -91,11 +91,15 @@ source_set("libarkfile_static") {
":arkfile_header_deps",
"$ark_root/libpandabase:libarkbase_static",
"$ark_root/libziparchive:libarkziparchive_static",
sdk_libc_secshared_dep,
]
external_deps = [ sdk_libc_secshared_dep ]
part_name = "runtime_core"
subsystem_name = "arkcompiler"
}
source_set("libarkfile_static_fuzz") {
ohos_source_set("libarkfile_static_fuzz") {
sources = libarkfile_sources
public_configs = libarkfile_configs
@ -105,8 +109,12 @@ source_set("libarkfile_static_fuzz") {
":arkfile_header_deps",
"$ark_root/libpandabase:libarkbase_static",
"$ark_root/libziparchive:libarkziparchive_static",
sdk_libc_secshared_dep,
]
external_deps = [ sdk_libc_secshared_dep ]
part_name = "runtime_core"
subsystem_name = "arkcompiler"
}
ohos_shared_library("libarkfile") {
@ -124,7 +132,7 @@ ohos_shared_library("libarkfile") {
subsystem_name = "arkcompiler"
}
source_set("libarkfile_frontend_set_static") {
ohos_source_set("libarkfile_frontend_set_static") {
sources = libarkfile_sources
public_configs = libarkfile_configs
@ -133,8 +141,12 @@ source_set("libarkfile_frontend_set_static") {
":arkfile_header_deps",
"$ark_root/libpandabase:libarkbase_frontend_static",
"$ark_root/libziparchive:libarkziparchive_frontend_static",
sdk_libc_secshared_dep,
]
external_deps = [ sdk_libc_secshared_dep ]
part_name = "runtime_core"
subsystem_name = "arkcompiler"
}
ohos_static_library("libarkfile_frontend_static") {

View File

@ -40,9 +40,10 @@ host_unittest_action("LibPandaFileTest") {
"$ark_root/assembler:libarkassembler_static",
"$ark_root/libpandafile:libarkfile_static",
"//third_party/googletest:gmock_main",
sdk_libc_secshared_dep,
]
external_deps = [ sdk_libc_secshared_dep ]
cflags = [ "-DWITH_MOCK" ]
}

View File

@ -25,7 +25,7 @@ config("arkziparchive_config") {
]
}
source_set("libarkziparchive_static") {
ohos_source_set("libarkziparchive_static") {
sources = [ "zip_archive.cpp" ]
public_configs = [
@ -35,16 +35,18 @@ source_set("libarkziparchive_static") {
sdk_libc_secshared_config,
]
deps = [
"$ark_root/libpandabase:libarkbase_static",
sdk_libc_secshared_dep,
]
deps = [ "$ark_root/libpandabase:libarkbase_static" ]
external_deps = [ sdk_libc_secshared_dep ]
if (ark_standalone_build || is_arkui_x) {
deps += [ "$ark_third_party_root/zlib:libz" ]
} else {
deps += [ "$ark_third_party_root/zlib:shared_libz" ]
}
part_name = "runtime_core"
subsystem_name = "arkcompiler"
}
ohos_shared_library("libarkziparchive") {
@ -62,7 +64,7 @@ ohos_shared_library("libarkziparchive") {
subsystem_name = "arkcompiler"
}
source_set("libarkziparchive_frontend_set_static") {
ohos_source_set("libarkziparchive_frontend_set_static") {
sources = [ "zip_archive.cpp" ]
public_configs = [
@ -72,12 +74,14 @@ source_set("libarkziparchive_frontend_set_static") {
sdk_libc_secshared_config,
]
deps = [
"$ark_root/libpandabase:libarkbase_frontend_static",
sdk_libc_secshared_dep,
]
deps = [ "$ark_root/libpandabase:libarkbase_frontend_static" ]
external_deps = [ sdk_libc_secshared_dep ]
deps += [ "$ark_third_party_root/zlib:libz" ]
part_name = "runtime_core"
subsystem_name = "arkcompiler"
}
ohos_static_library("libarkziparchive_frontend_static") {

View File

@ -31,8 +31,9 @@ host_unittest_action("LibZipArchiveTest") {
"$ark_root/assembler:libarkassembler_static",
"$ark_root/libpandafile:libarkfile_static",
"$ark_root/libziparchive:libarkziparchive_static",
sdk_libc_secshared_dep,
]
external_deps = [ sdk_libc_secshared_dep ]
}
group("unittest") {

View File

@ -33,9 +33,10 @@ host_unittest_action("PlatformsTest") {
deps = [
"$ark_root/libpandabase:libarkbase_static",
"//third_party/googletest:gmock_main",
sdk_libc_secshared_dep,
]
external_deps = [ sdk_libc_secshared_dep ]
cflags = [ "-DWITH_MOCK" ]
}

View File

@ -29,8 +29,9 @@ host_unittest_action("PluginsTest") {
deps = [
"$ark_root/assembler:libarkassembler_static",
"$ark_root/libpandabase:libarkbase_static",
sdk_libc_secshared_dep,
]
external_deps = [ sdk_libc_secshared_dep ]
}
group("unittest") {