!2743 [abckit] Separate libabckit tests into separate targets

Merge pull request !2743 from Nazarov Konstantin/feature/abckit-separate-clang
This commit is contained in:
openharmony_ci 2024-10-31 09:27:08 +00:00 committed by Gitee
commit 8811583c2f
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
38 changed files with 771 additions and 854 deletions

View File

@ -66,21 +66,27 @@ foreach(plugin, enabled_plugins) {
source_files = []
}
group("arkassembler_header_deps") {
deps = [
":ark_asm_meta_gen_h",
":ark_asm_register_extensions_h",
":isa_gen_libarkassembler_ins_create_api_h",
":isa_gen_libarkassembler_ins_emit_h",
":isa_gen_libarkassembler_isa_h",
":isa_gen_libarkassembler_opcode_parsing_h",
":isa_gen_libarkassembler_operand_types_print_h",
]
}
ohos_static_library("libarkassembler_static") {
sources = libarkassembler_sources
public_configs = libarkassembler_configs
deps = [
":ark_asm_meta_gen_h",
":ark_asm_register_extensions_h",
":arkassembler_header_deps",
":isa_gen_libarkassembler_function_collect_string_cpp",
":isa_gen_libarkassembler_ins_create_api_h",
":isa_gen_libarkassembler_ins_emit_h",
":isa_gen_libarkassembler_ins_to_string_cpp",
":isa_gen_libarkassembler_isa_h",
":isa_gen_libarkassembler_opcode_parsing_h",
":isa_gen_libarkassembler_operand_types_print_h",
"$ark_root/libpandabase:libarkbase_static",
"$ark_root/libpandafile:libarkfile_static",
]
@ -115,15 +121,9 @@ ohos_source_set("libarkassembler_frontend_set_static") {
public_configs = libarkassembler_configs
deps = [
":ark_asm_meta_gen_h",
":ark_asm_register_extensions_h",
":arkassembler_header_deps",
":isa_gen_libarkassembler_function_collect_string_cpp",
":isa_gen_libarkassembler_ins_create_api_h",
":isa_gen_libarkassembler_ins_emit_h",
":isa_gen_libarkassembler_ins_to_string_cpp",
":isa_gen_libarkassembler_isa_h",
":isa_gen_libarkassembler_opcode_parsing_h",
":isa_gen_libarkassembler_operand_types_print_h",
"$ark_root/libpandabase:libarkbase_frontend_static",
"$ark_root/libpandafile:libarkfile_frontend_static",
]

View File

@ -88,12 +88,7 @@ libarkcompiler_configs = [
"$ark_root/libpandafile:arkfile_public_config",
]
ohos_shared_library("libarkcompiler") {
stack_protector_ret = false
sources = libarkcompiler_sources
configs = libarkcompiler_configs
group("arkcompiler_header_deps") {
deps = [
":codegen_language_extensions_h",
":compiler_events_gen_h",
@ -109,7 +104,6 @@ ohos_shared_library("libarkcompiler") {
":intrinsics_stub_inl",
":intrinsics_stub_inl_h",
":ir_dyn_base_types_h",
":isa_gen_libarkcompiler_inst_builder_gen_cpp",
":libarkcompiler_ecma_intrinsics_enum_inl",
":libarkcompiler_generate_ecma_inl",
":libarkcompiler_intrinsics_gen_inl_generate_operations_intrinsic_graph_inl",
@ -129,12 +123,24 @@ ohos_shared_library("libarkcompiler") {
":libarkcompiler_opcodes_h_inst_checker_gen_h",
":libarkcompiler_opcodes_h_opcodes_h",
":source_languages_h",
"$ark_root/libpandabase:libarkbase",
"$ark_root/libpandafile:isa_gen_libarkfile_bytecode_instruction-inl_gen_h",
"$ark_root/libpandafile:isa_gen_libarkfile_bytecode_instruction_enum_gen_h",
"$ark_root/libpandafile:libarkfile",
"$ark_root/libpandafile:libarkfile_type_gen_h",
]
}
ohos_shared_library("libarkcompiler") {
stack_protector_ret = false
sources = libarkcompiler_sources
configs = libarkcompiler_configs
deps = [
":arkcompiler_header_deps",
":isa_gen_libarkcompiler_inst_builder_gen_cpp",
"$ark_root/libpandabase:libarkbase",
"$ark_root/libpandafile:libarkfile",
]
external_deps = [ sdk_libc_secshared_dep ]
@ -146,55 +152,18 @@ ohos_shared_library("libarkcompiler") {
subsystem_name = "arkcompiler"
}
libarkcompiler_frontend_static_common_deps = [
":codegen_language_extensions_h",
":compiler_events_gen_h",
":compiler_interface_extensions_inl_h",
":compiler_logger_components_inc",
":compiler_options_gen_h",
":cpu_features_gen_inc",
":intrinsics_codegen_ext_inl_h",
":intrinsics_inline_inl",
":intrinsics_ir_build_inl_h",
":intrinsics_ir_build_static_call_inl",
":intrinsics_ir_build_virtual_call_inl",
":intrinsics_stub_inl",
":intrinsics_stub_inl_h",
":ir_dyn_base_types_h",
":isa_gen_libarkcompiler_inst_builder_gen_cpp",
":libarkcompiler_ecma_intrinsics_enum_inl",
":libarkcompiler_generate_ecma_inl",
":libarkcompiler_intrinsics_gen_inl_generate_operations_intrinsic_graph_inl",
":libarkcompiler_intrinsics_gen_inl_generate_operations_intrinsic_inst_inl",
":libarkcompiler_intrinsics_gen_inl_get_intrinsics_inl",
":libarkcompiler_intrinsics_gen_inl_get_intrinsics_names_inl",
":libarkcompiler_intrinsics_gen_inl_intrinsic_codegen_test_inl",
":libarkcompiler_intrinsics_gen_inl_intrinsic_flags_test_inl",
":libarkcompiler_intrinsics_gen_inl_intrinsics_codegen_inl",
":libarkcompiler_intrinsics_gen_inl_intrinsics_codegen_inl_h",
":libarkcompiler_intrinsics_gen_inl_intrinsics_enum_inl",
":libarkcompiler_intrinsics_gen_inl_intrinsics_flags_inl",
":libarkcompiler_intrinsics_gen_inl_intrinsics_ir_build_inl",
":libarkcompiler_opcodes_h_IR-instructions_md",
":libarkcompiler_opcodes_h_arch_info_gen_h",
":libarkcompiler_opcodes_h_codegen_arm64_gen_inc",
":libarkcompiler_opcodes_h_inst_checker_gen_h",
":libarkcompiler_opcodes_h_opcodes_h",
":source_languages_h",
"$ark_root/libpandabase:libarkbase_frontend_static",
"$ark_root/libpandafile:isa_gen_libarkfile_bytecode_instruction-inl_gen_h",
"$ark_root/libpandafile:isa_gen_libarkfile_bytecode_instruction_enum_gen_h",
"$ark_root/libpandafile:libarkfile_frontend_static",
"$ark_root/libpandafile:libarkfile_type_gen_h",
]
ohos_static_library("libarkcompiler_frontend_static") {
stack_protector_ret = false
sources = libarkcompiler_sources
configs = libarkcompiler_configs
deps = libarkcompiler_frontend_static_common_deps
deps = [
":arkcompiler_header_deps",
":isa_gen_libarkcompiler_inst_builder_gen_cpp",
"$ark_root/libpandabase:libarkbase_frontend_static",
"$ark_root/libpandafile:libarkfile_frontend_static",
]
if (is_arkui_x) {
deps += [ "$ark_third_party_root/bounds_checking_function:libsec_static" ]
@ -217,7 +186,12 @@ ohos_static_library(
defines = [ "IR_FOR_LIBARK_DEFECT_SCAN_AUX" ]
deps = libarkcompiler_frontend_static_common_deps
deps = [
":arkcompiler_header_deps",
":isa_gen_libarkcompiler_inst_builder_gen_cpp",
"$ark_root/libpandabase:libarkbase_frontend_static",
"$ark_root/libpandafile:libarkfile_frontend_static",
]
if (is_arkui_x) {
deps += [ "$ark_third_party_root/bounds_checking_function:libsec_static" ]

View File

@ -12,30 +12,12 @@
# limitations under the License.
import("//arkcompiler/runtime_core/ark_config.gni")
import("//arkcompiler/runtime_core/libabckit/libabckit_config.gni")
declare_args() {
enable_libabckit_coverage = false
}
import("//arkcompiler/runtime_core/libabckit/abckit_config.gni")
config("libabckit_coverage") {
if (enable_libabckit_coverage) {
cflags = [
"-fprofile-instr-generate",
"-fcoverage-mapping",
"-mllvm",
"-runtime-counter-relocation",
]
config("abckit_config") {
cflags_cc = [ "-std=c++17" ]
ldflags = [
"-fprofile-instr-generate",
"-fcoverage-mapping",
]
}
}
config("libabckit_config") {
cflags_cc = [
"-std=c++17",
cflags = [
"-pedantic",
"-pedantic-errors",
"-Wall",
@ -43,19 +25,35 @@ config("libabckit_config") {
"-Werror",
]
ldflags = []
if (!is_debug) {
defines = [ "NDEBUG" ]
}
if (libabckit_with_sanitizers) {
cflags = [
if (abckit_with_coverage) {
cflags += [
"-fprofile-instr-generate",
"-fcoverage-mapping",
"-mllvm",
"-runtime-counter-relocation",
]
ldflags += [
"-fprofile-instr-generate",
"-fcoverage-mapping",
]
}
if (abckit_with_sanitizers) {
cflags += [
"-fsanitize=address",
"-fsanitize-address-use-after-scope",
"-fsanitize=undefined",
"-fno-omit-frame-pointer",
]
ldflags = [
ldflags += [
"-lasan",
"-lubsan",
]
@ -64,324 +62,78 @@ config("libabckit_config") {
configs = [ sdk_libc_secshared_config ]
}
ark_gen_file("abckit_options_gen_h") {
template_file = "$ark_root/templates/options/options.h.erb"
data_file = "$ark_root/libabckit/src/options.yaml"
requires = [ "$ark_root/templates/common.rb" ]
output_file = "$target_gen_dir/generated/tmp/abckit_options_gen.h"
}
action("abckit_options") {
script = "./scripts/fix_options.sh"
args = [
rebase_path("$target_gen_dir/generated/tmp/abckit_options_gen.h"),
rebase_path("$target_gen_dir/generated/abckit_options_gen.h"),
]
inputs = [ "$ark_root/libabckit/src/options.yaml" ]
outputs = [ "$target_gen_dir/generated/abckit_options_gen.h" ]
deps = [ ":abckit_options_gen_h" ]
}
action("get_abckit_status") {
script = "scripts/get_abckit_status.py"
outputs = [ "$target_gen_dir/abckit_status.csv" ]
}
ohos_executable("abckit_canary") {
cflags = [
"-std=c99",
"-pedantic",
"-pedantic-errors",
"-Wall",
"-Wextra",
"-Werror",
"-Wno-typedef-redefinition",
]
cflags += [ "-Wno-typedef-redefinition" ] # NOTE(ivagin)
sources = [ "tests/canary.c" ]
include_dirs = [ "$ark_root" ]
install_enable = false
part_name = "runtime_core"
subsystem_name = "arkcompiler"
}
group("libabckit_packages") {
if (enable_libabckit) {
group("abckit_packages") {
if (abckit_enable) {
deps = [
":libabckit(${host_toolchain})",
"abckit:abckit(${host_toolchain})",
"src:libabckit(${host_toolchain})",
]
}
}
group("libabckit_tests") {
group("abckit_tests") {
testonly = true
deps = [
":abckit_canary(${host_toolchain})",
":abckit_check_clang_format",
":abckit_check_clang_tidy",
":abckit_documentation",
":get_abckit_status",
"tests:AbcKitTestAction",
]
}
config("libabckit_public_config") {
include_dirs = [ "include" ]
}
ohos_source_set("libabckit_static") {
sources = [
"src/abckit_impl.cpp",
"src/helpers_common.cpp",
"src/ir_impl.cpp",
"src/ir_interface_impl.cpp",
"src/isa_dynamic_impl.cpp",
"src/isa_dynamic_impl_instr_1.cpp",
"src/isa_dynamic_impl_instr_2.cpp",
"src/isa_static_impl.cpp",
"src/metadata_arkts_inspect_impl.cpp",
"src/metadata_arkts_modify_impl.cpp",
"src/metadata_inspect_impl.cpp",
"src/metadata_js_inspect_impl.cpp",
"src/metadata_js_modify_impl.cpp",
"src/metadata_modify_impl.cpp",
"src/statuses_impl.cpp",
]
include_dirs = [
"$ark_root",
"$ark_root/libpandabase",
"$target_gen_dir/src",
]
configs = [
"$abckit_root:libabckit_coverage",
":libabckit_config",
]
deps = [ ":abckit_options" ]
part_name = "runtime_core"
subsystem_name = "arkcompiler"
}
group("libabckit_adapter_static_header_deps") {
deps = [
"src/adapter_dynamic/templates:isa_gen_libabckit_inst_props_helpers_dynamic_inc",
"src/adapter_static:get_intrinsic_id_static_inc",
"src/templates/abckit_intrinsics:ark_gen_libabckit_abckit_intrinsics_inl",
"src/templates/abckit_intrinsics:ark_gen_libabckit_abckit_intrinsics_opcodes_inc",
"src/templates/abckit_intrinsics:ark_gen_libabckit_abckit_intrinsics_vreg_width_h",
"src/templates/dyn_intrinsics:isa_gen_libabckit_dyn_intrinsics_enum_inc",
"src/templates/dyn_intrinsics:isa_gen_libabckit_dyn_intrinsics_flags_inc",
"src/templates/dyn_intrinsics:isa_gen_libabckit_get_dyn_intrinsics_names_inc",
]
}
ohos_source_set("libabckit_adapter_static_source_set") {
sources = [
"src/adapter_static/abckit_static.cpp",
"src/adapter_static/helpers_static.cpp",
"src/adapter_static/ir_static.cpp",
"src/adapter_static/ir_static_instr_1.cpp",
"src/adapter_static/metadata_inspect_static.cpp",
"src/adapter_static/metadata_modify_static.cpp",
"src/adapter_static/runtime_adapter_static.cpp",
]
ins_create_wrapper_dyn_dir = get_label_info(
"$ark_root/libabckit/src/wrappers:isa_gen_libabckit_ins_create_wrapper_api_inc",
"target_gen_dir")
intrinsics_gen_dir = get_label_info(
"$ark_root/libabckit/src/adapter_dynamic/templates:isa_gen_libabckit_dyn_intrinsics_enum_inl",
"target_gen_dir")
include_dirs = [
"$ark_root/static_core", # this target should not include headers from
# dynamic runtime, so static_core must be listed
# first
"$ark_root",
"$ark_root/libabckit",
"$ark_root/include",
"$target_gen_dir/src/codegen",
"$target_gen_dir/src/adapter_static",
"$target_gen_dir/src/adapter_dynamic/generated",
"$target_gen_dir/libabckit/src",
"$intrinsics_gen_dir/../generated",
"$ins_create_wrapper_dyn_dir",
]
part_name = "runtime_core"
subsystem_name = "arkcompiler"
configs = [
"$ark_root/static_core/assembler:arkassembler_public_config",
"$ark_root/static_core/bytecode_optimizer:bytecodeopt_public_config",
"$ark_root/static_core/compiler:arkcompiler_public_config",
"$ark_root/static_core/libpandafile:arkfile_public_config",
"$ark_root/static_core/libpandabase:arkbase_public_config",
"$ark_root/static_core/runtime:arkruntime_public_config", # NOTE
"$ark_root/static_core:ark_config", # NOTE
":libabckit_config",
]
configs += [ "$abckit_root:libabckit_coverage" ]
deps = [
":concat_abckit_intrinsics_yaml",
":libabckit_adapter_static_header_deps",
"$ark_root/static_core/abc2program:arkts_abc2program",
"$ark_root/static_core/assembler:libarktsassembler",
"$ark_root/static_core/assembler:libarktsassembler",
"$ark_root/static_core/bytecode_optimizer:libarktsbytecodeopt",
"$ark_root/static_core/bytecode_optimizer:libarktsbytecodeopt",
"$ark_root/static_core/libpandabase:libarktsbase",
"$ark_root/static_core/libpandafile:libarktsfile",
]
}
abckit_yaml = "abckit_compiler_intrinsics.yaml"
action("crop_abckit_intrinsics_yaml") {
script = "./scripts/fix_intrinsics_yml.sh"
args = [
rebase_path("src/$abckit_yaml"),
rebase_path("$target_gen_dir/generated/$abckit_yaml"),
]
inputs = [ "src/$abckit_yaml" ]
outputs = [ "$target_gen_dir/generated/$abckit_yaml" ]
}
runtime_intrinsics_gen_dir =
get_label_info(
"$ark_root/static_core/runtime:arkruntime_gen_intrinsics_yaml",
"target_gen_dir")
concat_yamls("concat_abckit_intrinsics_yaml") {
extra_dependencies = [
"$ark_root/static_core/runtime:arkruntime_gen_intrinsics_yaml",
":crop_abckit_intrinsics_yaml",
]
output_file = "$runtime_intrinsics_gen_dir/abckit_intrinsics.yaml"
default_file = "$runtime_intrinsics_gen_dir/intrinsics.yaml"
add_yamls = [ "$target_gen_dir/generated/$abckit_yaml" ]
}
group("libabckit_adapter_dynamic_header_deps") {
deps = [
"src/templates/abckit_intrinsics:ark_gen_libabckit_abckit_intrinsics_inl",
"src/templates/abckit_intrinsics:ark_gen_libabckit_abckit_intrinsics_opcodes_inc",
"src/templates/abckit_intrinsics:ark_gen_libabckit_abckit_intrinsics_vreg_width_h",
"src/templates/dyn_intrinsics:isa_gen_libabckit_dyn_intrinsics_enum_inc",
"src/templates/dyn_intrinsics:isa_gen_libabckit_dyn_intrinsics_flags_inc",
"src/templates/dyn_intrinsics:isa_gen_libabckit_get_dyn_intrinsics_names_inc",
]
}
ohos_source_set("libabckit_adapter_dynamic_source_set") {
sources = [
"src/adapter_dynamic/abckit_dynamic.cpp",
"src/adapter_dynamic/helpers_dynamic.cpp",
"src/adapter_dynamic/metadata_inspect_dynamic.cpp",
"src/adapter_dynamic/metadata_modify_dynamic.cpp",
]
ins_create_wrapper_dyn_dir = get_label_info(
"$ark_root/libabckit/src/wrappers:isa_gen_libabckit_ins_create_wrapper_api_inc",
"target_gen_dir")
include_dirs = [
"$ark_root",
"$ark_root/libabckit",
"$ark_root/include",
"$ins_create_wrapper_dyn_dir",
]
part_name = "runtime_core"
subsystem_name = "arkcompiler"
configs = [
"$ark_root:ark_config",
"$ark_root/assembler:arkassembler_public_config",
"$ark_root/libpandabase:arkbase_public_config",
"$ark_root/libpandafile:arkfile_public_config",
":libabckit_config",
]
configs += [ "$abckit_root:libabckit_coverage" ]
deps = [
":concat_abckit_intrinsics_yaml",
":libabckit_adapter_dynamic_header_deps",
"$ark_root/abc2program:abc2program",
"$ark_root/assembler:libarkassembler",
"src/wrappers/graph_wrapper:libabckit_graph_wrapper_source_set",
]
# external_deps = [
# "ets_runtime:libark_jsruntime",
# ]
}
ohos_shared_library("libabckit") {
deps = [
":libabckit_adapter_dynamic_source_set",
":libabckit_adapter_static_source_set",
":libabckit_static",
"src/codegen:libabckit_codegen_dynamic_source_set",
"src/codegen:libabckit_codegen_static_source_set",
"src/irbuilder_dynamic:libabckit_ir_builder_dynamic_source_set",
"src/mem_manager:libabckit_mem_manager_source_set",
"src/wrappers:libabckit_abcfile_wrapper_source_set",
"src/wrappers:libabckit_pandasm_wrapper_source_set",
]
configs = [
"$abckit_root:libabckit_coverage",
":libabckit_config",
]
if (is_linux) {
libs = [ "stdc++fs" ]
if (abckit_enable) {
deps = [
":abckit_documentation",
":abckit_status",
"tests:abckit_canary",
"tests:abckit_gtests_action",
]
}
}
output_extension = "so"
part_name = "runtime_core"
subsystem_name = "arkcompiler"
group("abckit_tests_full") {
testonly = true
if (abckit_enable) {
deps = [
":abckit_check_clang_format",
":abckit_check_clang_tidy",
":abckit_tests",
"tests:abckit_stress_tests",
]
}
}
action("abckit_status") {
script = "scripts/abckit_status.py"
outputs = [ "$target_gen_dir/abckit_status.csv" ]
}
action("abckit_documentation") {
script = "$ark_root/libabckit/scripts/run_script.sh"
script = "$abckit_root/scripts/run_script.sh"
args = [
"--script=doxygen",
"--ret-code=0",
"--env=ABCKIT_DOXYGEN_OUT_DIR=" + rebase_path("$target_gen_dir") +
"/doxygen/",
"--env=ABCKIT_PROJECT_ROOT=" + rebase_path("$ark_root") + "/libabckit/",
"--script-args=" + rebase_path("$ark_root") + "/libabckit/.doxygen",
"--env=ABCKIT_PROJECT_ROOT=" + rebase_path("$abckit_root"),
"--script-args=" + rebase_path("$abckit_root") + "/.doxygen",
]
outputs = [ "$target_gen_dir/abckit_documentation_status.txt" ]
}
action("abckit_force_clang_format") {
script = "$ark_root/static_core/scripts/code_style/code_style_check.py"
script = "$ark_root_static/scripts/code_style/code_style_check.py"
args = [
rebase_path("$ark_root") + "/libabckit/",
rebase_path("$abckit_root"),
"--reformat",
]
outputs = [ "$target_gen_dir/generated/tmp/force_clang_format_status.txt" ]
}
action("abckit_check_clang_format") {
script = "$ark_root/static_core/scripts/code_style/code_style_check.py"
args = [ rebase_path("$ark_root") + "/libabckit/" ]
script = "$ark_root_static/scripts/code_style/code_style_check.py"
args = [ rebase_path("$abckit_root") ]
outputs = [ "$target_gen_dir/generated/tmp/check_clang_format_status.txt" ]
}
action("abckit_check_clang_tidy") {
script = "$ark_root/static_core/scripts/clang-tidy/clang_tidy_check.py"
script = "$ark_root_static/scripts/clang-tidy/clang_tidy_check.py"
args = [
rebase_path("$ark_root"),
rebase_path("$ark_root_dynamic"),
rebase_path("$root_out_dir"),
"--check-libabckit",
"--filename-filter=libabckit/*",
@ -390,7 +142,20 @@ action("abckit_check_clang_tidy") {
outputs = [ "$target_gen_dir/generated/tmp/check_clang_tidy_status.txt" ]
deps = [
":abckit_options",
":libabckit",
"$ark_root_dynamic/assembler:arkassembler_header_deps",
"$ark_root_dynamic/compiler:arkcompiler_header_deps",
"$ark_root_dynamic/libpandabase:arkbase_header_deps",
"$ark_root_dynamic/libpandafile:arkfile_header_deps",
"$ark_root_static/assembler:arktsassembler_header_deps",
"$ark_root_static/compiler:arktscompiler_header_deps",
"$ark_root_static/libpandabase:arktsbase_header_deps",
"$ark_root_static/libpandafile:arktsfile_header_deps",
"src:libabckit_header_deps",
"src/adapter_dynamic:abckit_adapter_dynamic_header_deps",
"src/adapter_static:abckit_adapter_static_header_deps",
"src/codegen:abckit_codegen_dynamic_source_set_header_deps",
"src/codegen:abckit_codegen_static_source_set_header_deps",
"src/irbuilder_dynamic:abckit_ir_builder_dynamic_source_set_header_deps",
"src/wrappers:abckit_pandasm_wrapper_source_set_header_deps",
]
}

View File

@ -3,13 +3,15 @@
AbcKit is a library for `abc` file inspection and modification.
Documentation:
* [How to build and test](doc/how_to_build_and_test.md)
* [Cook Book](doc/mini_cookbook.md)
* [Implementation description](doc/implementation_description.md)
- [How to build and test](doc/how_to_build_and_test.md)
- [Cook Book](doc/mini_cookbook.md)
- [Implementation description](doc/implementation_description.md)
## How to download and build
Download:
```sh
repo init -u https://gitee.com/ark-standalone-build/manifest.git -b master
repo sync -c -j8
@ -18,6 +20,7 @@ repo forall -c 'git lfs pull'
```
Build AbcKit:
```sh
./ark.py x64.release libabckit_packages --gn-args="is_standard_system=true enable_libabckit=true"
./ark.py x64.release abckit_packages --gn-args="is_standard_system=true abckit_enable=true"
```

View File

@ -12,19 +12,21 @@
# limitations under the License.
import("//arkcompiler/runtime_core/ark_config.gni")
import("//arkcompiler/runtime_core/libabckit/abckit_config.gni")
ohos_executable("abckit") {
sources = [ "abckit.cpp" ]
include_dirs = [
"$ark_root/libabckit/include",
"$abckit_root/include",
"$target_gen_dir",
]
configs = [
"$ark_root/libpandabase:arkbase_public_config",
"$ark_root/libabckit:libabckit_config",
"$ark_root_dynamic/libpandabase:arkbase_public_config",
"$abckit_root:abckit_config",
]
deps = [
"$ark_root/assembler:libarkassembler",
"$ark_root/libabckit:libabckit",
"$abckit_root/src:libabckit",
"$ark_root_dynamic/assembler:libarkassembler",
]
install_enable = false
part_name = "runtime_core"

View File

@ -12,7 +12,7 @@
# limitations under the License.
import("//arkcompiler/runtime_core/ark_config.gni")
import("//arkcompiler/runtime_core/libabckit/libabckit_config.gni")
import("//arkcompiler/runtime_core/libabckit/abckit_config.gni")
template("abckit_plugin") {
ohos_shared_library("${target_name}") {
@ -24,7 +24,7 @@ template("abckit_plugin") {
"include_dirs",
])
deps = [ "$abckit_root:libabckit" ]
deps = [ "$abckit_root/src:libabckit" ]
include_dirs = [ "$abckit_root/include" ]

View File

@ -13,8 +13,11 @@
js_root = "//arkcompiler/ets_runtime"
abckit_root = "//arkcompiler/runtime_core/libabckit"
ark_root_dynamic = "//arkcompiler/runtime_core"
ark_root_static = "//arkcompiler/runtime_core/static_core"
declare_args() {
enable_libabckit = false
libabckit_with_sanitizers = false
abckit_enable = false
abckit_with_sanitizers = false
abckit_with_coverage = false
}

View File

@ -13,27 +13,27 @@ Build AbcKit:
```sh
# Debug mode
./ark.py x64.debug libabckit_packages --gn-args="is_standard_system=true enable_libabckit=true"
./ark.py x64.debug abckit_packages --gn-args="is_standard_system=true abckit_enable=true"
# Release mode
./ark.py x64.release libabckit_packages --gn-args="is_standard_system=true enable_libabckit=true"
./ark.py x64.release abckit_packages --gn-args="is_standard_system=true abckit_enable=true"
```
Run unit tests:
```sh
# Debug mode
./ark.py x64.debug libabckit_tests --gn-args="is_standard_system=true enable_libabckit=true"
./ark.py x64.debug abckit_tests --gn-args="is_standard_system=true abckit_enable=true"
# Release mode
./ark.py x64.release libabckit_tests --gn-args="is_standard_system=true enable_libabckit=true"
./ark.py x64.release abckit_tests --gn-args="is_standard_system=true abckit_enable=true"
```
Run unit tests with sanitizers:
```sh
# Debug mode
./ark.py x64.debug libabckit_tests --gn-args="is_standard_system=true enable_libabckit=true libabckit_with_sanitizers=true"
./ark.py x64.debug abckit_tests --gn-args="is_standard_system=true abckit_enable=true libabckit_with_sanitizers=true"
# Release mode
./ark.py x64.release libabckit_tests --gn-args="is_standard_system=true enable_libabckit=true libabckit_with_sanitizers=true"
./ark.py x64.release abckit_tests --gn-args="is_standard_system=true abckit_enable=true libabckit_with_sanitizers=true"
```
# Full tests (`self-check.sh`)

View File

@ -37,7 +37,7 @@ args = get_args()
API_PATTERN = "^[\w,\d,_, ,*]+\(\*([\w,\d,_]+)\)\(.*"
domain_patterns = ["struct Abckit\S*Api\s\{", "struct Abckit\S*ApiStatic\s\{", "struct Abckit\S*ApiDynamic\s\{"]
libabckit_dir = os.path.join(script_dir, "..")
libabckit_tests = os.path.join(libabckit_dir, "tests")
abckit_tests = os.path.join(libabckit_dir, "tests")
sources = {
"include/c/ir_core.h",
@ -265,7 +265,7 @@ def get_tests_statistics(api, tests):
def main(api) :
tests = []
for dirpath, _, filenames in os.walk(libabckit_tests):
for dirpath, _, filenames in os.walk(abckit_tests):
for name in filenames:
if name.endswith(".cpp"):
tests += collect_tests(os.path.join(dirpath, name), api)

View File

@ -13,7 +13,7 @@
def collect_implemented_api_map(excluded_funcs)
implemented_api_raw = nil
Dir.chdir(File.dirname(__FILE__)) do
implemented_api_raw = `python get_abckit_status.py --print-implemented`.split(/\n/)
implemented_api_raw = `python abckit_status.py --print-implemented`.split(/\n/)
end
implemented_api_map = {}

View File

@ -19,7 +19,7 @@ abckit_test = File.join(abckit_root, "/tests/wrong_mode_tests/")
implemented_api_raw = nil
Dir.chdir(abckit_scripts) do
implemented_api_raw = `python get_abckit_status.py --print-implemented`.split(/\n/)
implemented_api_raw = `python abckit_status.py --print-implemented`.split(/\n/)
end
implemented_api_map = {}

View File

@ -65,7 +65,7 @@ build_standalone() {
set -e
rm -rf out/$TARGET
./ark.py $TARGET libabckit_packages --gn-args="is_standard_system=true libabckit_with_sanitizers=$SANITIZERS enable_notice_collection=false enable_libabckit_coverage=$COVERAGE ohos_components_checktype=3 enable_libabckit=true"
./ark.py $TARGET abckit_packages --gn-args="is_standard_system=true abckit_with_sanitizers=$SANITIZERS enable_notice_collection=false abckit_with_coverage=$COVERAGE ohos_components_checktype=3 abckit_enable=true"
set +e
}
@ -90,7 +90,7 @@ run_check_documentation() {
build_and_run_tests() {
set -e
ninja AbcKitTest
ninja abckit_gtests
LSAN_OPTIONS=""
if [ "$SANITIZERS" = "true" ]; then
@ -109,10 +109,10 @@ build_and_run_tests() {
LD_LIBRARY_PATH=./arkcompiler/runtime_core/:./arkcompiler/ets_runtime/:./thirdparty/icu/:./thirdparty/zlib/ \
LSAN_OPTIONS="$LSAN_OPTIONS" \
ASAN_OPTIONS=verify_asan_link_order=0 \
./tests/unittest/arkcompiler/runtime_core/libabckit/AbcKitTest
./tests/unittest/arkcompiler/runtime_core/libabckit/abckit_gtests
if [ "$SANITIZERS" = "false" ]; then
ninja abckit_stress_test_package
ninja abckit_stress_tests_package
if [ "$TARGET" = "x64.debug" ]; then
../../arkcompiler/runtime_core/libabckit/tests/stress/stress.py --build-dir $(realpath .)

119
libabckit/src/BUILD.gn Normal file
View File

@ -0,0 +1,119 @@
# Copyright (c) 2024 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import("//arkcompiler/runtime_core/ark_config.gni")
import("//arkcompiler/runtime_core/libabckit/abckit_config.gni")
ark_gen_file("abckit_options_gen_h") {
template_file = "$ark_root_dynamic/templates/options/options.h.erb"
data_file = "$abckit_root/src/options.yaml"
requires = [ "$ark_root_dynamic/templates/common.rb" ]
output_file = "$target_gen_dir/generated/tmp/abckit_options_gen.h"
}
action("abckit_options_h") {
script = "$abckit_root/scripts/fix_options.sh"
args = [
rebase_path("$target_gen_dir/generated/tmp/abckit_options_gen.h"),
rebase_path("$target_gen_dir/generated/abckit_options_gen.h"),
]
inputs = [ "$abckit_root/src/options.yaml" ]
outputs = [ "$target_gen_dir/generated/abckit_options_gen.h" ]
deps = [ ":abckit_options_gen_h" ]
}
action("crop_abckit_intrinsics_yaml") {
script = "$abckit_root/scripts/fix_intrinsics_yml.sh"
args = [
rebase_path("abckit_compiler_intrinsics.yaml"),
rebase_path("$target_gen_dir/generated/abckit_compiler_intrinsics.yaml"),
]
inputs = [ "abckit_compiler_intrinsics.yaml" ]
outputs = [ "$target_gen_dir/generated/abckit_compiler_intrinsics.yaml" ]
}
concat_yamls("abckit_concat_intrinsics_yaml") {
extra_dependencies = [
"$ark_root_static/runtime:arkruntime_gen_intrinsics_yaml",
":crop_abckit_intrinsics_yaml",
]
output_file =
get_label_info("$ark_root_static/runtime:arkruntime_gen_intrinsics_yaml",
"target_gen_dir") + "/abckit_intrinsics.yaml"
default_file =
get_label_info("$ark_root_static/runtime:arkruntime_gen_intrinsics_yaml",
"target_gen_dir") + "/intrinsics.yaml"
add_yamls = [ "$target_gen_dir/generated/abckit_compiler_intrinsics.yaml" ]
}
group("libabckit_header_deps") {
deps = [ ":abckit_options_h" ]
}
ohos_source_set("libabckit_source_set") {
sources = [
"abckit_impl.cpp",
"helpers_common.cpp",
"ir_impl.cpp",
"ir_interface_impl.cpp",
"isa_dynamic_impl.cpp",
"isa_dynamic_impl_instr_1.cpp",
"isa_dynamic_impl_instr_2.cpp",
"isa_static_impl.cpp",
"metadata_arkts_inspect_impl.cpp",
"metadata_arkts_modify_impl.cpp",
"metadata_inspect_impl.cpp",
"metadata_js_inspect_impl.cpp",
"metadata_js_modify_impl.cpp",
"metadata_modify_impl.cpp",
"statuses_impl.cpp",
]
include_dirs = [
"$ark_root_dynamic",
"$ark_root_dynamic/libpandabase",
"$target_gen_dir/src",
]
configs = [ "$abckit_root:abckit_config" ]
deps = [ ":libabckit_header_deps" ]
part_name = "runtime_core"
subsystem_name = "arkcompiler"
}
ohos_shared_library("libabckit") {
deps = [
":libabckit_header_deps",
":libabckit_source_set",
"adapter_dynamic:abckit_adapter_dynamic_source_set",
"adapter_static:abckit_adapter_static_source_set",
"codegen:abckit_codegen_dynamic_source_set",
"codegen:abckit_codegen_static_source_set",
"irbuilder_dynamic:abckit_ir_builder_dynamic_source_set",
"mem_manager:abckit_mem_manager_source_set",
"wrappers:abckit_abcfile_wrapper_source_set",
"wrappers:abckit_pandasm_wrapper_source_set",
]
configs = [ "$abckit_root:abckit_config" ]
if (is_linux) {
libs = [ "stdc++fs" ]
}
output_extension = "so"
part_name = "runtime_core"
subsystem_name = "arkcompiler"
}

View File

@ -16,7 +16,7 @@
#ifndef LIBABCKIT_SRC_ABCKIT_OPTIONS_H
#define LIBABCKIT_SRC_ABCKIT_OPTIONS_H
#include "arkcompiler/runtime_core/libabckit/generated/abckit_options_gen.h"
#include "arkcompiler/runtime_core/libabckit/src/generated/abckit_options_gen.h"
namespace libabckit {
extern libabckit::Options g_abckitOptions;

View File

@ -0,0 +1,62 @@
# Copyright (c) 2024 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import("//arkcompiler/runtime_core/ark_config.gni")
import("//arkcompiler/runtime_core/libabckit/abckit_config.gni")
group("abckit_adapter_dynamic_header_deps") {
deps = [
"$abckit_root/src/templates/abckit_intrinsics:abckit_ark_gen_abckit_intrinsics_inl",
"$abckit_root/src/templates/abckit_intrinsics:abckit_ark_gen_abckit_intrinsics_opcodes_inc",
"$abckit_root/src/templates/abckit_intrinsics:abckit_ark_gen_abckit_intrinsics_vreg_width_h",
"$abckit_root/src/templates/dyn_intrinsics:abckit_isa_gen_dyn_intrinsics_enum_inc",
"$abckit_root/src/templates/dyn_intrinsics:abckit_isa_gen_dyn_intrinsics_flags_inc",
"$abckit_root/src/templates/dyn_intrinsics:abckit_isa_gen_get_dyn_intrinsics_names_inc",
]
}
ohos_source_set("abckit_adapter_dynamic_source_set") {
sources = [
"abckit_dynamic.cpp",
"helpers_dynamic.cpp",
"metadata_inspect_dynamic.cpp",
"metadata_modify_dynamic.cpp",
]
include_dirs = [
"$ark_root_dynamic",
"$abckit_root",
get_label_info(
"$abckit_root/wrappers:abckit_isa_gen_ins_create_wrapper_api_inc",
"target_gen_dir"),
]
part_name = "runtime_core"
subsystem_name = "arkcompiler"
configs = [
"$ark_root_dynamic:ark_config",
"$ark_root_dynamic/assembler:arkassembler_public_config",
"$ark_root_dynamic/libpandabase:arkbase_public_config",
"$ark_root_dynamic/libpandafile:arkfile_public_config",
"$abckit_root:abckit_config",
]
deps = [
":abckit_adapter_dynamic_header_deps",
"$abckit_root/src:abckit_concat_intrinsics_yaml",
"$abckit_root/src/wrappers/graph_wrapper:libabckit_graph_wrapper_source_set",
"$ark_root_dynamic/abc2program:abc2program",
"$ark_root_dynamic/assembler:libarkassembler",
]
}

View File

@ -12,9 +12,9 @@
# limitations under the License.
import("//arkcompiler/runtime_core/ark_config.gni")
import("//arkcompiler/runtime_core/libabckit/libabckit_config.gni")
import("//arkcompiler/runtime_core/libabckit/abckit_config.gni")
ark_isa_gen("isa_gen_libabckit") {
ark_isa_gen("abckit_isa_gen") {
sources = "$abckit_root/src/adapter_dynamic/templates"
requires = [ "$abckit_root/scripts/inst_props_api.rb" ]
template_files = [ "inst_props_helpers_dynamic.inc.erb" ]

View File

@ -11,13 +11,87 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import("//arkcompiler/runtime_core/libabckit/abckit_config.gni")
import("//arkcompiler/runtime_core/static_core/ark_config.gni")
import("//arkcompiler/runtime_core/static_vm_config.gni")
ark_gen_file("get_intrinsic_id_static_inc") {
extra_dependencies = [ "$ark_root/runtime:arkruntime_gen_intrinsics_yaml" ]
extra_dependencies =
[ "$ark_root_static/runtime:arkruntime_gen_intrinsics_yaml" ]
template_file = "templates/get_intrinsic_id_static.inc.erb"
data = [ "$target_gen_dir/../../../static_core/runtime/intrinsics.yaml" ]
api = [ "$ark_root/runtime/templates/intrinsics.rb" ]
api = [ "$ark_root_static/runtime/templates/intrinsics.rb" ]
output_file = "$target_gen_dir/generated/get_intrinsic_id_static.inc"
}
group("abckit_adapter_static_header_deps") {
deps = [
":get_intrinsic_id_static_inc",
"$abckit_root/src/adapter_dynamic/templates:abckit_isa_gen_inst_props_helpers_dynamic_inc",
"$abckit_root/src/templates/abckit_intrinsics:abckit_ark_gen_abckit_intrinsics_inl",
"$abckit_root/src/templates/abckit_intrinsics:abckit_ark_gen_abckit_intrinsics_opcodes_inc",
"$abckit_root/src/templates/abckit_intrinsics:abckit_ark_gen_abckit_intrinsics_vreg_width_h",
"$abckit_root/src/templates/dyn_intrinsics:abckit_isa_gen_dyn_intrinsics_enum_inc",
"$abckit_root/src/templates/dyn_intrinsics:abckit_isa_gen_dyn_intrinsics_flags_inc",
"$abckit_root/src/templates/dyn_intrinsics:abckit_isa_gen_get_dyn_intrinsics_names_inc",
]
}
ohos_source_set("abckit_adapter_static_source_set") {
sources = [
"abckit_static.cpp",
"helpers_static.cpp",
"ir_static.cpp",
"ir_static_instr_1.cpp",
"metadata_inspect_static.cpp",
"metadata_modify_static.cpp",
"runtime_adapter_static.cpp",
]
ins_create_wrapper_dyn_dir =
get_label_info(
"$abckit_root/wrappers:abckit_isa_gen_ins_create_wrapper_api_inc",
"target_gen_dir")
intrinsics_gen_dir = get_label_info(
"$abckit_root/adapter_dynamic/templates:abckit_isa_gen_dyn_intrinsics_enum_inl",
"target_gen_dir")
include_dirs = [
"$ark_root_dynamic/static_core", # this target should not include headers
# from dynamic runtime, so static_core
# must be listed first
"$ark_root_dynamic",
"$abckit_root",
"$target_gen_dir/../codegen",
"$target_gen_dir/../adapter_static",
"$target_gen_dir/../adapter_dynamic/generated",
"$target_gen_dir/../libabckit/src",
"$intrinsics_gen_dir/../generated",
"$ins_create_wrapper_dyn_dir",
]
part_name = "runtime_core"
subsystem_name = "arkcompiler"
configs = [
"$ark_root_static/assembler:arkassembler_public_config",
"$ark_root_static/bytecode_optimizer:bytecodeopt_public_config",
"$ark_root_static/compiler:arkcompiler_public_config",
"$ark_root_static/libpandafile:arkfile_public_config",
"$ark_root_static/libpandabase:arkbase_public_config",
"$ark_root_static/runtime:arkruntime_public_config",
"$ark_root_dynamic/static_core:ark_config",
"$abckit_root:abckit_config",
]
deps = [
":abckit_adapter_static_header_deps",
"$abckit_root/src:abckit_concat_intrinsics_yaml",
"$ark_root_static/abc2program:arkts_abc2program",
"$ark_root_static/assembler:libarktsassembler",
"$ark_root_static/assembler:libarktsassembler",
"$ark_root_static/bytecode_optimizer:libarktsbytecodeopt",
"$ark_root_static/bytecode_optimizer:libarktsbytecodeopt",
"$ark_root_static/libpandabase:libarktsbase",
"$ark_root_static/libpandafile:libarktsfile",
]
}

View File

@ -11,11 +11,11 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import("//arkcompiler/runtime_core/libabckit/libabckit_config.gni")
import("//arkcompiler/runtime_core/libabckit/abckit_config.gni")
import("//arkcompiler/runtime_core/static_core/ark_config.gni")
import("//arkcompiler/runtime_core/static_vm_config.gni")
ark_gen("ark_gen_libabckit") {
ark_gen("abckit_ark_gen") {
data = [
"../abckit_compiler_intrinsics.yaml",
"$isa_gen_dir/isa.yaml",
@ -26,39 +26,39 @@ ark_gen("ark_gen_libabckit") {
]
sources = "templates"
api = [
"$ark_root/compiler/optimizer/templates/intrinsics/compiler_intrinsics.rb",
"$ark_root/isa/isapi.rb",
"$ark_root_static/compiler/optimizer/templates/intrinsics/compiler_intrinsics.rb",
"$ark_root_static/isa/isapi.rb",
]
extra_dependencies = [
"$ark_root/isa:isa_combine",
"$ark_root/runtime:arkruntime_gen_intrinsics_yaml",
"$ark_root_static/isa:isa_combine",
"$ark_root_static/runtime:arkruntime_gen_intrinsics_yaml",
]
requires = [
"$ark_root/libpandabase/utils.rb",
"$ark_root_static/libpandabase/utils.rb",
"codegen_static_isapi.rb",
"$ark_root/assembler/asm_isapi.rb",
"$ark_root_static/assembler/asm_isapi.rb",
]
destination = "$target_gen_dir/generated"
}
ark_gen_file("codegen_visitors_static_inc") {
extra_dependencies = [ "$ark_root:concat_plugins_yamls" ]
extra_dependencies = [ "$ark_root_static:concat_plugins_yamls" ]
template_file = "templates/codegen_visitors_static.inc.erb"
data = [
ark_plugin_options_yaml,
"../abckit_compiler_intrinsics.yaml",
]
api = [
"$ark_root/templates/plugin_options.rb",
"$ark_root/compiler/optimizer/templates/intrinsics/compiler_intrinsics.rb",
"$ark_root_static/templates/plugin_options.rb",
"$ark_root_static/compiler/optimizer/templates/intrinsics/compiler_intrinsics.rb",
]
output_file = "$target_gen_dir/generated/tmp/codegen_visitors_static.inc"
}
runtime_intrinsics_gen_dir =
get_label_info("$ark_root/runtime:arkruntime_gen_intrinsics_yaml",
get_label_info("$ark_root_static/runtime:arkruntime_gen_intrinsics_yaml",
"target_gen_dir")
ark_gen("ark_gen_libabckit") {
ark_gen("abckit_ark_gen") {
data = [
"$runtime_intrinsics_gen_dir/abckit_intrinsics.yaml",
ark_plugin_options_yaml,
@ -66,18 +66,19 @@ ark_gen("ark_gen_libabckit") {
template_files = [ "codegen_intrinsics_static.cpp.erb" ]
sources = "templates"
api = [
"$ark_root/compiler/optimizer/templates/intrinsics/compiler_intrinsics.rb",
"$ark_root/templates/plugin_options.rb",
"$ark_root_static/compiler/optimizer/templates/intrinsics/compiler_intrinsics.rb",
"$ark_root_static/templates/plugin_options.rb",
]
extra_dependencies = [
"$ark_root:concat_plugins_yamls",
"../../:concat_abckit_intrinsics_yaml",
"$ark_root_static:concat_plugins_yamls",
"$abckit_root/src:abckit_concat_intrinsics_yaml",
]
requires = [ "$ark_root/libpandabase/utils.rb" ]
requires = [ "$ark_root_static/libpandabase/utils.rb" ]
destination = "$target_gen_dir/generated/tmp"
}
ets_codegen_visitors_dir = "$ark_root/plugins/ets/bytecode_optimizer/visitors"
ets_codegen_visitors_dir =
"$ark_root_static/plugins/ets/bytecode_optimizer/visitors"
copy("ets_codegen_intrinsics_inc_copy") {
sources = [ "$ets_codegen_visitors_dir/ets_codegen_intrinsics.inc" ]
outputs = [ "$target_gen_dir/generated/tmp/ets_codegen_intrinsics.inc" ]
@ -86,7 +87,7 @@ copy("ets_codegen_visitors_inc_copy") {
sources = [ "$ets_codegen_visitors_dir/codegen_visitors.inc" ]
outputs = [ "$target_gen_dir/generated/tmp/codegen_visitors.inc" ]
}
ets_codegen_intrinsics_gen_target = "$ark_root/plugins/ets:isa_gen_ets_bytecodeopt_ets_codegen_intrinsics_gen_inc"
ets_codegen_intrinsics_gen_target = "$ark_root_static/plugins/ets:isa_gen_ets_bytecodeopt_ets_codegen_intrinsics_gen_inc"
ets_codegen_gen_dir =
get_label_info("$ets_codegen_intrinsics_gen_target", "target_gen_dir")
copy("ets_codegen_intrinsics_gen_copy") {
@ -97,7 +98,7 @@ copy("ets_codegen_intrinsics_gen_copy") {
action("fix_static_codegen_plugin_files") {
deps = [
":ark_gen_libabckit_codegen_intrinsics_static_cpp",
":abckit_ark_gen_codegen_intrinsics_static_cpp",
":codegen_visitors_static_inc",
":ets_codegen_intrinsics_gen_copy",
":ets_codegen_intrinsics_inc_copy",
@ -123,9 +124,9 @@ action("fix_static_codegen_plugin_files") {
ark_gen_file("codegen_call_intrinsics_static_inc") {
extra_dependencies = [
"$ark_root/runtime:arkruntime_gen_intrinsics_yaml",
"$ark_root:concat_plugins_yamls",
"../../:concat_abckit_intrinsics_yaml",
"$ark_root_static/runtime:arkruntime_gen_intrinsics_yaml",
"$ark_root_static:concat_plugins_yamls",
"$abckit_root/src:abckit_concat_intrinsics_yaml",
]
template_file = "templates/codegen_call_intrinsics_static.inc.erb"
data = [
@ -133,35 +134,39 @@ ark_gen_file("codegen_call_intrinsics_static_inc") {
ark_plugin_options_yaml,
]
api = [
"$ark_root/runtime/templates/intrinsics.rb",
"$ark_root/templates/plugin_options.rb",
"$ark_root_static/runtime/templates/intrinsics.rb",
"$ark_root_static/templates/plugin_options.rb",
]
output_file = "$target_gen_dir/generated/codegen_call_intrinsics_static.inc"
}
group("libabckit_codegen_static_source_set_header_deps") {
group("abckit_codegen_static_source_set_header_deps") {
deps = [
":ark_gen_libabckit_insn_selection_static_h",
":abckit_ark_gen_insn_selection_static_h",
":codegen_call_intrinsics_static_inc",
":fix_static_codegen_plugin_files",
]
}
ohos_source_set("libabckit_codegen_static_source_set") {
ohos_source_set("abckit_codegen_static_source_set") {
sources = [ "codegen_static.cpp" ]
bco_gen_dir =
get_label_info("$ark_root/bytecode_optimizer:libarktsbytecodeopt",
get_label_info("$ark_root_static/bytecode_optimizer:libarktsbytecodeopt",
"target_gen_dir")
ins_create_wrapper_dyn_dir = get_label_info(
"$ark_root/../libabckit/src/wrappers:isa_gen_libabckit_ins_create_wrapper_api_inc",
ins_create_wrapper_dyn_dir =
get_label_info(
"$abckit_root/src/wrappers:abckit_isa_gen_ins_create_wrapper_api_inc",
"target_gen_dir")
include_dirs = [
"$target_gen_dir",
"$ins_create_wrapper_dyn_dir",
"$ark_root", # this target should not include headers from dynamic runtime,
# so static_core must be listed first
"$ark_root/..",
"$ark_root_static", # this target should not include headers from dynamic
# runtime,
# so static_core must be listed first
"$ark_root_static/..",
"$bco_gen_dir",
]
@ -169,88 +174,87 @@ ohos_source_set("libabckit_codegen_static_source_set") {
subsystem_name = "arkcompiler"
configs = [
"$ark_root/:ark_config",
"$ark_root/assembler:arkassembler_public_config",
"$ark_root/compiler:arkcompiler_public_config",
"$ark_root/bytecode_optimizer:bytecodeopt_public_config",
"$ark_root/libpandafile:arkfile_public_config",
"$ark_root/libpandabase:arkbase_public_config",
"$ark_root/runtime:arkruntime_public_config",
"$abckit_root:libabckit_coverage",
"$abckit_root:libabckit_config",
"$ark_root_static/:ark_config",
"$ark_root_static/assembler:arkassembler_public_config",
"$ark_root_static/compiler:arkcompiler_public_config",
"$ark_root_static/bytecode_optimizer:bytecodeopt_public_config",
"$ark_root_static/libpandafile:arkfile_public_config",
"$ark_root_static/libpandabase:arkbase_public_config",
"$ark_root_static/runtime:arkruntime_public_config",
"$abckit_root:abckit_config",
]
deps = [
":ark_gen_libabckit_codegen_intrinsics_static_cpp",
":ark_gen_libabckit_insn_selection_static_cpp",
":libabckit_codegen_static_source_set_header_deps",
"$ark_root/compiler:libarktscompiler",
"$ark_root/libpandabase:libarktsbase",
"$ark_root/libpandafile:libarktsfile",
":abckit_ark_gen_codegen_intrinsics_static_cpp",
":abckit_ark_gen_insn_selection_static_cpp",
":abckit_codegen_static_source_set_header_deps",
"$ark_root_static/compiler:libarktscompiler",
"$ark_root_static/libpandabase:libarktsbase",
"$ark_root_static/libpandafile:libarktsfile",
]
}
group("libabckit_codegen_dynamic_source_set_header_deps") {
group("abckit_codegen_dynamic_source_set_header_deps") {
deps = [
"../templates/abckit_intrinsics:ark_gen_libabckit_abckit_intrinsics_inl",
"../templates/dyn_intrinsics:isa_gen_libabckit_dyn_intrinsics_enum_inc",
"../templates/dyn_intrinsics:isa_gen_libabckit_dyn_intrinsics_flags_inc",
"../templates/dyn_intrinsics:isa_gen_libabckit_get_dyn_intrinsics_names_inc",
"../templates/abckit_intrinsics:abckit_ark_gen_abckit_intrinsics_inl",
"../templates/dyn_intrinsics:abckit_isa_gen_dyn_intrinsics_enum_inc",
"../templates/dyn_intrinsics:abckit_isa_gen_dyn_intrinsics_flags_inc",
"../templates/dyn_intrinsics:abckit_isa_gen_get_dyn_intrinsics_names_inc",
"templates_dynamic:abckit_isa_gen_check_width_dynamic_h",
"templates_dynamic:abckit_isa_gen_generate_ecma_inl",
"templates_dynamic:abckit_isa_gen_ic_info_h",
"templates_dynamic:abckit_isa_gen_insn_selection_dynamic_h",
"templates_dynamic:codegen_visitors_dyn_inc",
"templates_dynamic:isa_gen_libabckit_check_width_dynamic_h",
"templates_dynamic:isa_gen_libabckit_generate_ecma_inl",
"templates_dynamic:isa_gen_libabckit_ic_info_h",
"templates_dynamic:isa_gen_libabckit_insn_selection_dynamic_h",
]
}
ohos_source_set("libabckit_codegen_dynamic_source_set") {
ohos_source_set("abckit_codegen_dynamic_source_set") {
sources = [
"codegen_dynamic.cpp",
"ic_slot_allocator.cpp",
]
intrinsics_gen_dir = get_label_info(
"$ark_root/../libabckit/src/templates/dyn_intrinsics:isa_gen_libabckit_dyn_intrinsics_enum_inl",
"$abckit_root/src/templates/dyn_intrinsics:abckit_isa_gen_dyn_intrinsics_enum_inl",
"target_gen_dir")
insn_selection_dyn_dir = get_label_info(
"$ark_root/../libabckit/src/codegen/templates_dynamic:isa_gen_libabckit_insn_selection_dynamic_h",
"$abckit_root/src/codegen/templates_dynamic:abckit_isa_gen_insn_selection_dynamic_h",
"target_gen_dir")
ins_create_wrapper_dyn_dir = get_label_info(
"$ark_root/../libabckit/src/wrappers:isa_gen_libabckit_ins_create_wrapper_api_inc",
ins_create_wrapper_dyn_dir =
get_label_info(
"$abckit_root/src/wrappers:abckit_isa_gen_ins_create_wrapper_api_inc",
"target_gen_dir")
intrinsics_compiler_gen_dir = get_label_info(
"$ark_root/compiler:libarkcompiler_intrinsics_gen_inl_get_intrinsics_names_inl",
"$ark_root_static/compiler:libarkcompiler_intrinsics_gen_inl_get_intrinsics_names_inl",
"target_gen_dir")
include_dirs = [
"$ark_root/compiler",
"$ark_root/runtime",
"$ark_root_static/compiler",
"$ark_root_static/runtime",
"$target_gen_dir",
"$intrinsics_gen_dir/../generated",
"$insn_selection_dyn_dir/..",
"$ins_create_wrapper_dyn_dir",
"$intrinsics_compiler_gen_dir/generated",
"$ark_root",
"$ark_root/..",
"$ark_root_static",
"$ark_root_static/..",
]
part_name = "runtime_core"
subsystem_name = "arkcompiler"
configs = [
"$ark_root/:ark_config",
"$ark_root/runtime:arkruntime_public_config",
"$ark_root/compiler:arkcompiler_public_config",
"$ark_root/libpandabase:arkbase_public_config",
"$ark_root/libpandafile:arkfile_public_config",
"$abckit_root:libabckit_coverage",
"$abckit_root:libabckit_config",
"$ark_root_static/:ark_config",
"$ark_root_static/runtime:arkruntime_public_config",
"$ark_root_static/compiler:arkcompiler_public_config",
"$ark_root_static/libpandabase:arkbase_public_config",
"$ark_root_static/libpandafile:arkfile_public_config",
"$abckit_root:abckit_config",
]
deps = [
":libabckit_codegen_dynamic_source_set_header_deps",
"$ark_root/compiler:libarktscompiler",
"templates_dynamic:isa_gen_libabckit_check_width_dynamic_cpp",
"templates_dynamic:isa_gen_libabckit_insn_selection_dynamic_cpp",
":abckit_codegen_dynamic_source_set_header_deps",
"$ark_root_static/compiler:libarktscompiler",
"templates_dynamic:abckit_isa_gen_check_width_dynamic_cpp",
"templates_dynamic:abckit_isa_gen_insn_selection_dynamic_cpp",
]
}

View File

@ -12,8 +12,9 @@
# limitations under the License.
import("//arkcompiler/runtime_core/ark_config.gni")
import("//arkcompiler/runtime_core/libabckit/abckit_config.gni")
ark_isa_gen("isa_gen_libabckit") {
ark_isa_gen("abckit_isa_gen") {
template_files = [
"insn_selection_dynamic.h.erb",
"insn_selection_dynamic.cpp.erb",
@ -24,31 +25,31 @@ ark_isa_gen("isa_gen_libabckit") {
destination = "$target_gen_dir/../generated"
requires = [
"codegen_dynamic_isapi.rb",
"$ark_root/assembler/asm_isapi.rb",
"$ark_root_dynamic/assembler/asm_isapi.rb",
]
}
ark_isa_gen("isa_gen_libabckit") {
ark_isa_gen("abckit_isa_gen") {
template_files = [ "ic_info.h.erb" ]
sources = "."
destination = "$target_gen_dir/../generated"
requires = [
"codegen_dynamic_isapi.rb",
"$ark_root/assembler/asm_isapi.rb",
"$ark_root_dynamic/assembler/asm_isapi.rb",
]
}
ark_isa_gen("isa_gen_libabckit") {
ark_isa_gen("abckit_isa_gen") {
template_files = [ "generate_ecma.inl.erb" ]
sources = "."
requires = [ "$ark_root/assembler/asm_isapi.rb" ]
requires = [ "$ark_root_dynamic/assembler/asm_isapi.rb" ]
destination = "$target_gen_dir/../generated"
}
ark_gen_file("codegen_visitors_dyn_inc") {
extra_dependencies = [ "$ark_root:concat_plugins_yamls" ]
extra_dependencies = [ "$ark_root_dynamic:concat_plugins_yamls" ]
template_file = "codegen_visitors_dyn.inc.erb"
data_file = "$ark_root/templates/plugin_options.yaml"
requires = [ "$ark_root/templates/plugin_options.rb" ]
data_file = "$ark_root_dynamic/templates/plugin_options.yaml"
requires = [ "$ark_root_dynamic/templates/plugin_options.rb" ]
output_file = "$target_gen_dir/../generated/codegen_visitors_dyn.inc"
}

View File

@ -11,11 +11,19 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import("//arkcompiler/runtime_core/libabckit/libabckit_config.gni")
import("//arkcompiler/runtime_core/libabckit/abckit_config.gni")
import("//arkcompiler/runtime_core/static_core/ark_config.gni")
import("//arkcompiler/runtime_core/static_vm_config.gni")
ohos_source_set("libabckit_ir_builder_dynamic_source_set") {
group("abckit_ir_builder_dynamic_source_set_header_deps") {
deps = [
"../templates/abckit_intrinsics:abckit_ark_gen_inst_builder_abckit_intrinsics_inc",
"templates:abckit_isa_gen_bytecode_inst-inl_gen_h",
"templates:abckit_isa_gen_bytecode_inst_enum_gen_h",
]
}
ohos_source_set("abckit_ir_builder_dynamic_source_set") {
sources = [
"$target_gen_dir/generated/inst_builder_dyn_gen.cpp",
"inst_builder_dyn.cpp",
@ -23,47 +31,47 @@ ohos_source_set("libabckit_ir_builder_dynamic_source_set") {
]
cross_values_gen_dir = get_label_info(
"$ark_root/cross_values:cross_values_getters_generate(${default_toolchain})",
"$ark_root_static/cross_values:cross_values_getters_generate(${default_toolchain})",
"target_gen_dir")
entrypoints_compiler_gen_dir = get_label_info(
"$ark_root/runtime:arkruntime_gen_entrypoints_entrypoints_compiler_inl",
"$ark_root_static/runtime:arkruntime_gen_entrypoints_entrypoints_compiler_inl",
"target_gen_dir")
intrinsics_gen_dir = get_label_info(
"$ark_root/../libabckit/src/templates/dyn_intrinsics:isa_gen_libabckit_dyn_intrinsics_enum_inl",
"$abckit_root/src/templates/dyn_intrinsics:abckit_isa_gen_dyn_intrinsics_enum_inl",
"target_gen_dir")
intrinsics_compiler_gen_dir = get_label_info(
"$ark_root/compiler:libarkcompiler_intrinsics_gen_inl_get_intrinsics_names_inl",
"$ark_root_static/compiler:libarkcompiler_intrinsics_gen_inl_get_intrinsics_names_inl",
"target_gen_dir")
include_dirs = [
"$target_gen_dir",
"$entrypoints_compiler_gen_dir/generated",
"$intrinsics_gen_dir/../generated",
"$cross_values_gen_dir",
"$ark_root/runtime",
"$ark_root_static/runtime",
"$intrinsics_compiler_gen_dir",
"$ark_root", # this target should not include headers from dynamic runtime,
# so static_core must be listed first
"$ark_root/..",
"$ark_root_static", # this target should not include headers from dynamic
# runtime,
# so static_core must be listed first
"$ark_root_static/..",
]
part_name = "runtime_core"
subsystem_name = "arkcompiler"
configs = [
"$ark_root/:ark_config",
"$ark_root/compiler:arkcompiler_public_config",
"$ark_root/libpandabase:arkbase_public_config",
"$ark_root/libpandafile:arkfile_public_config",
"$ark_root/runtime:profiling_gen_public_config",
"$abckit_root:libabckit_coverage",
"$abckit_root:libabckit_config",
"$ark_root_static/:ark_config",
"$ark_root_static/compiler:arkcompiler_public_config",
"$ark_root_static/libpandabase:arkbase_public_config",
"$ark_root_static/libpandafile:arkfile_public_config",
"$ark_root_static/runtime:profiling_gen_public_config",
"$abckit_root:abckit_config",
]
deps = [
"$ark_root/compiler:libarktscompiler",
"../templates/abckit_intrinsics:ark_gen_libabckit_inst_builder_abckit_intrinsics_inc",
"templates:isa_gen_libabckit_bytecode_inst-inl_gen_h",
"templates:isa_gen_libabckit_bytecode_inst_enum_gen_h",
"templates:isa_gen_libabckit_inst_builder_dyn_gen_cpp",
":abckit_ir_builder_dynamic_source_set_header_deps",
"$ark_root_static/compiler:libarktscompiler",
"templates:abckit_isa_gen_inst_builder_dyn_gen_cpp",
]
}

View File

@ -12,19 +12,20 @@
# limitations under the License.
import("//arkcompiler/runtime_core/ark_config.gni")
import("//arkcompiler/runtime_core/libabckit/abckit_config.gni")
ark_isa_gen("isa_gen_libabckit") {
ark_isa_gen("abckit_isa_gen") {
template_files = [ "inst_builder_dyn_gen.cpp.erb" ]
sources = "."
destination = "$target_gen_dir/../generated"
}
ark_isa_gen("isa_gen_libabckit") {
ark_isa_gen("abckit_isa_gen") {
template_files = [
"bytecode_inst_enum_gen.h.erb",
"bytecode_inst-inl_gen.h.erb",
]
sources = "."
destination = "$target_gen_dir/../generated"
requires = [ "$ark_root/libpandafile/pandafile_isapi.rb" ]
requires = [ "$ark_root_dynamic/libpandafile/pandafile_isapi.rb" ]
}

View File

@ -12,25 +12,22 @@
# limitations under the License.
import("//arkcompiler/runtime_core/ark_config.gni")
import("//arkcompiler/runtime_core/libabckit/libabckit_config.gni")
import("//arkcompiler/runtime_core/libabckit/abckit_config.gni")
ohos_source_set("libabckit_mem_manager_source_set") {
ohos_source_set("abckit_mem_manager_source_set") {
sources = [ "mem_manager.cpp" ]
include_dirs = [ "$ark_root/static_core" ]
include_dirs = [ "$ark_root_static" ]
part_name = "runtime_core"
subsystem_name = "arkcompiler"
configs = [
"$ark_root/static_core:ark_config",
"$ark_root/static_core/libpandabase:arkbase_public_config",
"$ark_root_static:ark_config",
"$ark_root_static/libpandabase:arkbase_public_config",
]
configs += [
"$abckit_root:libabckit_coverage",
"$abckit_root:libabckit_config",
]
configs += [ "$abckit_root:abckit_config" ]
deps = [ "$ark_root/static_core/libpandabase:libarktsbase" ]
deps = [ "$ark_root_static/libpandabase:libarktsbase" ]
}

View File

@ -15,10 +15,11 @@ import("//arkcompiler/runtime_core/static_core/ark_config.gni")
import("//arkcompiler/runtime_core/static_vm_config.gni")
intrinsics_compiler_gen_dir = get_label_info(
"$ark_root/compiler:libarkcompiler_intrinsics_gen_inl_get_intrinsics_names_inl",
"$ark_root_static/compiler:libarkcompiler_intrinsics_gen_inl_get_intrinsics_names_inl",
"target_gen_dir")
isa_gen_dir = get_label_info("$ark_root/isa:isa_combine", "target_gen_dir")
ark_gen("ark_gen_libabckit") {
isa_gen_dir =
get_label_info("$ark_root_static/isa:isa_combine", "target_gen_dir")
ark_gen("abckit_ark_gen") {
data = [
"../../abckit_compiler_intrinsics.yaml",
"$isa_gen_dir/isa.yaml",
@ -26,20 +27,20 @@ ark_gen("ark_gen_libabckit") {
template_files = [ "inst_builder_abckit_intrinsics.inc.erb" ]
sources = "."
api = [
"$ark_root/compiler/optimizer/templates/intrinsics/compiler_intrinsics.rb",
"$ark_root/isa/isapi.rb",
"$ark_root_static/compiler/optimizer/templates/intrinsics/compiler_intrinsics.rb",
"$ark_root_static/isa/isapi.rb",
]
extra_dependencies = [
"$ark_root/isa:isa_combine",
"$ark_root/runtime:arkruntime_gen_intrinsics_yaml",
"../dyn_intrinsics:isa_gen_libabckit_dyn_intrinsics_opcodes_inc",
":ark_gen_libabckit_abckit_intrinsics_inl",
"$ark_root_static/isa:isa_combine",
"$ark_root_static/runtime:arkruntime_gen_intrinsics_yaml",
"../dyn_intrinsics:abckit_isa_gen_dyn_intrinsics_opcodes_inc",
":abckit_ark_gen_abckit_intrinsics_inl",
]
requires = [ "$ark_root/libpandabase/utils.rb" ]
requires = [ "$ark_root_static/libpandabase/utils.rb" ]
destination = "$intrinsics_compiler_gen_dir/generated"
}
ark_gen("ark_gen_libabckit") {
ark_gen("abckit_ark_gen") {
data = [
"../../abckit_compiler_intrinsics.yaml",
"$isa_gen_dir/isa.yaml",
@ -47,21 +48,22 @@ ark_gen("ark_gen_libabckit") {
template_files = [ "abckit_intrinsics_opcodes.inc.erb" ]
sources = "."
api = [
"$ark_root/compiler/optimizer/templates/intrinsics/compiler_intrinsics.rb",
"$ark_root/isa/isapi.rb",
"$ark_root_static/compiler/optimizer/templates/intrinsics/compiler_intrinsics.rb",
"$ark_root_static/isa/isapi.rb",
]
extra_dependencies = [
"$ark_root/isa:isa_combine",
"$ark_root/runtime:arkruntime_gen_intrinsics_yaml",
"../dyn_intrinsics/:isa_gen_libabckit_dyn_intrinsics_opcodes_inc",
"$ark_root_static/isa:isa_combine",
"$ark_root_static/runtime:arkruntime_gen_intrinsics_yaml",
"../dyn_intrinsics/:abckit_isa_gen_dyn_intrinsics_opcodes_inc",
]
requires = [ "$ark_root/libpandabase/utils.rb" ]
requires = [ "$ark_root_static/libpandabase/utils.rb" ]
destination = "$intrinsics_compiler_gen_dir/generated"
}
bco_gen_dir = get_label_info("$ark_root/bytecode_optimizer:libarktsbytecodeopt",
"target_gen_dir")
ark_gen("ark_gen_libabckit") {
bco_gen_dir =
get_label_info("$ark_root_static/bytecode_optimizer:libarktsbytecodeopt",
"target_gen_dir")
ark_gen("abckit_ark_gen") {
data = [
"../../abckit_compiler_intrinsics.yaml",
"$isa_gen_dir/isa.yaml",
@ -72,14 +74,14 @@ ark_gen("ark_gen_libabckit") {
]
sources = "."
api = [
"$ark_root/compiler/optimizer/templates/intrinsics/compiler_intrinsics.rb",
"$ark_root/isa/isapi.rb",
"$ark_root_static/compiler/optimizer/templates/intrinsics/compiler_intrinsics.rb",
"$ark_root_static/isa/isapi.rb",
]
extra_dependencies = [
"$ark_root/isa:isa_combine",
"$ark_root/runtime:arkruntime_gen_intrinsics_yaml",
"../dyn_intrinsics:isa_gen_libabckit_dyn_intrinsics_cases_inc",
"$ark_root_static/isa:isa_combine",
"$ark_root_static/runtime:arkruntime_gen_intrinsics_yaml",
"../dyn_intrinsics:abckit_isa_gen_dyn_intrinsics_cases_inc",
]
requires = [ "$ark_root/libpandabase/utils.rb" ]
requires = [ "$ark_root_static/libpandabase/utils.rb" ]
destination = "$bco_gen_dir/generated"
}

View File

@ -12,11 +12,12 @@
# limitations under the License.
import("//arkcompiler/runtime_core/ark_config.gni")
import("//arkcompiler/runtime_core/libabckit/abckit_config.gni")
intrinsics_compiler_gen_dir = get_label_info(
"$ark_root/static_core/compiler:libarkcompiler_intrinsics_gen_inl_get_intrinsics_names_inl",
"$ark_root_static/compiler:libarkcompiler_intrinsics_gen_inl_get_intrinsics_names_inl",
"target_gen_dir")
ark_isa_gen("isa_gen_libabckit") {
ark_isa_gen("abckit_isa_gen") {
template_files = [
"get_dyn_intrinsics_names.inc.erb",
"dyn_intrinsics_flags.inc.erb",
@ -24,16 +25,16 @@ ark_isa_gen("isa_gen_libabckit") {
"dyn_intrinsics_opcodes.inc.erb",
]
sources = "."
requires = [ "$ark_root/assembler/asm_isapi.rb" ]
requires = [ "$ark_root_dynamic/assembler/asm_isapi.rb" ]
destination = "$intrinsics_compiler_gen_dir/generated"
}
bco_gen_dir = get_label_info(
"$ark_root/static_core/bytecode_optimizer:libarktsbytecodeopt",
"target_gen_dir")
ark_isa_gen("isa_gen_libabckit") {
bco_gen_dir =
get_label_info("$ark_root_static/bytecode_optimizer:libarktsbytecodeopt",
"target_gen_dir")
ark_isa_gen("abckit_isa_gen") {
template_files = [ "dyn_intrinsics_cases.inc.erb" ]
sources = "."
requires = [ "$ark_root/assembler/asm_isapi.rb" ]
requires = [ "$ark_root_dynamic/assembler/asm_isapi.rb" ]
destination = "$bco_gen_dir/generated"
}

View File

@ -12,9 +12,9 @@
# limitations under the License.
import("//arkcompiler/runtime_core/ark_config.gni")
import("//arkcompiler/runtime_core/libabckit/libabckit_config.gni")
import("//arkcompiler/runtime_core/libabckit/abckit_config.gni")
ark_isa_gen("isa_gen_libabckit") {
ark_isa_gen("abckit_isa_gen") {
template_files = [
"opc_to_string.h.erb",
"ins_create_wrapper_api.inc.erb",
@ -22,16 +22,23 @@ ark_isa_gen("isa_gen_libabckit") {
sources = "templates"
destination = "$target_gen_dir/generated"
requires = [
"$ark_root/assembler/asm_isapi.rb",
"$ark_root/libpandafile/pandafile_isapi.rb",
"$ark_root_dynamic/assembler/asm_isapi.rb",
"$ark_root_dynamic/libpandafile/pandafile_isapi.rb",
]
}
ohos_source_set("libabckit_pandasm_wrapper_source_set") {
group("abckit_pandasm_wrapper_source_set_header_deps") {
deps = [
":abckit_isa_gen_ins_create_wrapper_api_inc",
":abckit_isa_gen_opc_to_string_h",
]
}
ohos_source_set("abckit_pandasm_wrapper_source_set") {
sources = [ "pandasm_wrapper.cpp" ]
include_dirs = [
"$ark_root",
"$ark_root_dynamic",
"$target_gen_dir",
]
@ -39,34 +46,31 @@ ohos_source_set("libabckit_pandasm_wrapper_source_set") {
subsystem_name = "arkcompiler"
configs = [
"$ark_root/:ark_config",
"$ark_root/assembler:arkassembler_public_config",
"$ark_root/libpandafile:arkfile_public_config",
"$ark_root/libpandabase:arkbase_public_config",
"$abckit_root:libabckit_coverage",
"$abckit_root:libabckit_config",
"$ark_root_dynamic/:ark_config",
"$ark_root_dynamic/assembler:arkassembler_public_config",
"$ark_root_dynamic/libpandafile:arkfile_public_config",
"$ark_root_dynamic/libpandabase:arkbase_public_config",
"$abckit_root:abckit_config",
]
deps = [
":isa_gen_libabckit_ins_create_wrapper_api_inc",
":isa_gen_libabckit_opc_to_string_h",
"$ark_root/assembler:libarkassembler",
":abckit_pandasm_wrapper_source_set_header_deps",
"$ark_root_dynamic/assembler:libarkassembler",
]
}
ohos_source_set("libabckit_abcfile_wrapper_source_set") {
ohos_source_set("abckit_abcfile_wrapper_source_set") {
sources = [ "abcfile_wrapper.cpp" ]
part_name = "runtime_core"
subsystem_name = "arkcompiler"
configs = [
"$ark_root:ark_config",
"$ark_root/libpandafile:arkfile_public_config",
"$ark_root/libpandabase:arkbase_public_config",
"$abckit_root:libabckit_coverage",
"$abckit_root:libabckit_config",
"$ark_root_dynamic:ark_config",
"$ark_root_dynamic/libpandafile:arkfile_public_config",
"$ark_root_dynamic/libpandabase:arkbase_public_config",
"$abckit_root:abckit_config",
]
deps = [ "$ark_root/assembler:libarkassembler" ]
deps = [ "$ark_root_dynamic/assembler:libarkassembler" ]
}

View File

@ -11,7 +11,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import("//arkcompiler/runtime_core/libabckit/libabckit_config.gni")
import("//arkcompiler/runtime_core/libabckit/abckit_config.gni")
import("//arkcompiler/runtime_core/static_core/ark_config.gni")
import("//arkcompiler/runtime_core/static_vm_config.gni")
@ -19,29 +19,32 @@ ohos_source_set("libabckit_graph_wrapper_source_set") {
sources = [ "graph_wrapper.cpp" ]
cross_values_gen_dir = get_label_info(
"$ark_root/cross_values:cross_values_getters_generate(${default_toolchain})",
"$ark_root_static/cross_values:cross_values_getters_generate(${default_toolchain})",
"target_gen_dir")
entrypoints_compiler_gen_dir = get_label_info(
"$ark_root/runtime:arkruntime_gen_entrypoints_entrypoints_compiler_inl",
"$ark_root_static/runtime:arkruntime_gen_entrypoints_entrypoints_compiler_inl",
"target_gen_dir")
bytecode_inst_enum_gen_dir = get_label_info(
"$ark_root/../libabckit/src/irbuilder_dynamic/templates:isa_gen_libabckit_bytecode_inst_enum_gen_h",
"$abckit_root/src/irbuilder_dynamic/templates:abckit_isa_gen_bytecode_inst_enum_gen_h",
"target_gen_dir")
intrinsics_gen_dir = get_label_info(
"$ark_root/../libabckit/src/templates/dyn_intrinsics:isa_gen_libabckit_dyn_intrinsics_enum_inl",
"$abckit_root/src/templates/dyn_intrinsics:abckit_isa_gen_dyn_intrinsics_enum_inl",
"target_gen_dir")
reg_encoder_visitors_dir =
get_label_info("$ark_root/bytecode_optimizer:reg_encoder_visitors_inc",
"target_gen_dir")
codegen_visitors_dyn_dir = get_label_info(
"$ark_root/../libabckit/src/codegen/templates_dynamic:codegen_visitors_dyn_inc",
get_label_info(
"$ark_root_static/bytecode_optimizer:reg_encoder_visitors_inc",
"target_gen_dir")
ins_create_wrapper_dyn_dir = get_label_info(
"$ark_root/../libabckit/src/wrappers:isa_gen_libabckit_ins_create_wrapper_api_inc",
codegen_visitors_dyn_dir =
get_label_info(
"$abckit_root/src/codegen/templates_dynamic:codegen_visitors_dyn_inc",
"target_gen_dir")
ins_create_wrapper_dyn_dir =
get_label_info(
"$abckit_root/src/wrappers:abckit_isa_gen_ins_create_wrapper_api_inc",
"target_gen_dir")
include_dirs = [
"$ark_root/runtime/libpandabase",
"$ark_root/runtime",
"$ark_root_static/runtime/libpandabase",
"$ark_root_static/runtime",
"$entrypoints_compiler_gen_dir/generated",
"$bytecode_inst_enum_gen_dir/..",
"$intrinsics_gen_dir/../generated",
@ -49,24 +52,26 @@ ohos_source_set("libabckit_graph_wrapper_source_set") {
"$codegen_visitors_dyn_dir/..",
"$cross_values_gen_dir",
"$ins_create_wrapper_dyn_dir",
"$ark_root", # this target should not include headers from dynamic runtime,
# so static_core must be listed first
"$ark_root/..",
"$ark_root_static", # this target should not include headers from dynamic
# runtime,
# so static_core must be listed first
"$ark_root_static/..",
]
part_name = "runtime_core"
subsystem_name = "arkcompiler"
configs = [
"$ark_root/:ark_config",
"$ark_root/assembler:arkassembler_public_config",
"$ark_root/compiler:arkcompiler_public_config",
"$ark_root/libpandabase:arkbase_public_config",
"$ark_root/libpandafile:arkfile_public_config",
"$ark_root/runtime:profiling_gen_public_config",
"$abckit_root:libabckit_coverage",
"$abckit_root:libabckit_config",
"$ark_root_static/:ark_config",
"$ark_root_static/assembler:arkassembler_public_config",
"$ark_root_static/compiler:arkcompiler_public_config",
"$ark_root_static/libpandabase:arkbase_public_config",
"$ark_root_static/libpandafile:arkfile_public_config",
"$ark_root_static/runtime:profiling_gen_public_config",
"$abckit_root:abckit_config",
]
deps = [ "$ark_root/compiler:libarktscompiler" ]
deps = [ "$ark_root_static/compiler:libarktscompiler" ]
}

View File

@ -162,7 +162,7 @@ struct InsWrapper {
{
}
// NOLINTNEXTLINE(readability-duplicate-include)
#include <generated/ins_create_wrapper_api.inc>
#include "arkcompiler/runtime_core/libabckit/src/wrappers/generated/ins_create_wrapper_api.inc"
};
// NOLINTEND(misc-non-private-member-variables-in-classes)
@ -188,7 +188,7 @@ public:
return function;
}
// NOLINTNEXTLINE(readability-duplicate-include)
#include <generated/ins_create_wrapper_api.inc>
#include "arkcompiler/runtime_core/libabckit/src/wrappers/generated/ins_create_wrapper_api.inc"
};
// std::string DeMangleName(const std::string &name);

View File

@ -14,8 +14,7 @@
import("//arkcompiler/ets_frontend/es2panda/es2abc_config.gni")
import("//arkcompiler/ets_frontend/ets2panda/ets2abc_config.gni")
import("//arkcompiler/runtime_core/ark_config.gni")
import("//arkcompiler/runtime_core/libabckit/libabckit_config.gni")
import("//arkcompiler/runtime_core/tests/test_helper.gni")
import("//arkcompiler/runtime_core/libabckit/abckit_config.gni")
template("create_merge_file") {
assert(defined(invoker.input_file), "input_file is required!")
@ -40,6 +39,23 @@ template("create_merge_file") {
}
}
ohos_executable("abckit_canary") {
cflags = [
"-std=c99",
"-pedantic",
"-pedantic-errors",
"-Wall",
"-Wextra",
"-Werror",
"-Wno-typedef-redefinition",
]
sources = [ "canary.c" ]
include_dirs = [ "$ark_root_dynamic" ]
install_enable = false
part_name = "runtime_core"
subsystem_name = "arkcompiler"
}
test_js_path = "//arkcompiler/runtime_core/libabckit/tests/"
test_js_files = [
@ -356,7 +372,7 @@ template("libabckit_host_unittest_action") {
_module_out_path_ = invoker.module_out_path
# unittest for host running
action("${_target_name_}Action") {
action("${_target_name_}_action") {
testonly = true
defines = [ "HOST_UT" ]
@ -366,7 +382,7 @@ template("libabckit_host_unittest_action") {
deps = [ _host_test_target_ ]
script = "$ark_root/libabckit/scripts/run_script.sh"
script = "$abckit_root/scripts/run_script.sh"
args = [
"--script=" + rebase_path(_root_out_dir_) +
@ -379,10 +395,11 @@ template("libabckit_host_unittest_action") {
"/thirdparty/zlib:",
]
if (libabckit_with_sanitizers) {
if (abckit_with_sanitizers) {
args += [ "--env=ASAN_OPTIONS=verify_asan_link_order=0" ]
args += [ "--env=LSAN_OPTIONS=suppressions=" + rebase_path("$ark_root") +
"/libabckit/tests/sanitizers/ignored_leaks.supp" ]
args +=
[ "--env=LSAN_OPTIONS=suppressions=" + rebase_path("$abckit_root") +
"/tests/sanitizers/ignored_leaks.supp" ]
}
print(script, string_join(" ", args))
@ -394,7 +411,7 @@ template("libabckit_host_unittest_action") {
}
}
libabckit_host_unittest_action("AbcKitTest") {
libabckit_host_unittest_action("abckit_gtests") {
module_out_path = module_output_path
sources = [
@ -575,19 +592,19 @@ libabckit_host_unittest_action("AbcKitTest") {
]
include_dirs = [
"$ark_root",
"$ark_root/libabckit",
"$ark_root/libabckit/include",
"$ark_root/libabckit/src",
"$ark_root/libabckit/tests",
"$ark_root_dynamic",
"$abckit_root",
"$abckit_root/include",
"$abckit_root/src",
"$abckit_root/tests",
]
configs = [ "$ark_root/libabckit:libabckit_config" ]
configs = [ "$abckit_root:abckit_config" ]
deps = [
":abckit_ets_vm_helpers",
":abckit_js_vm_helpers",
"$ark_root/libabckit:libabckit",
"$abckit_root/src:libabckit",
]
foreach(file, test_js_files) {
@ -616,50 +633,32 @@ libabckit_host_unittest_action("AbcKitTest") {
]
}
group("abckit_stress_test_package") {
group("libabckit_stress_tests_package") {
deps = [
"$ark_root/libabckit/abckit:abckit(${host_toolchain})",
"$ark_root/libabckit/abckit/stress_plugin:abckit_stress_plugin(${host_toolchain})",
"$ark_root/static_core/verification/verifier:verifier_bin(${host_toolchain})",
"$abckit_root/abckit:abckit(${host_toolchain})",
"$abckit_root/abckit/stress_plugin:abckit_stress_plugin(${host_toolchain})",
"$ark_root_static/verification/verifier:verifier_bin(${host_toolchain})",
]
}
action("abckit_stress_test") {
deps = [ ":abckit_stress_test_package" ]
outputs = [ "$target_gen_dir/abckit_stress_test.txt" ]
action("abckit_stress_tests") {
deps = [ ":libabckit_stress_tests_package" ]
outputs = [ "$target_gen_dir/abckit_stress_tests.txt" ]
script = "stress/stress.py"
}
group("unittest") {
testonly = true
if (enable_libabckit) {
deps = [
":AbcKitTest",
":abckit_stress_test",
]
}
}
group("host_unittest") {
testonly = true
if (enable_libabckit) {
deps = [
":AbcKitTestAction",
":abckit_stress_test",
]
}
}
ohos_source_set("abckit_js_vm_helpers") {
sources = [ "helpers/helpers_js_runtime.cpp" ]
deps = [ "$ark_root/assembler:libarkassembler" ]
deps = [
"$ark_root_dynamic/assembler:libarkassembler",
"$js_root:libark_jsruntime_test_set",
]
if (ark_standalone_build) {
deps += [ "$js_root:libark_jsruntime_test_set" ]
}
include_dirs = [
"$ark_root_dynamic",
"$abckit_root/src",
]
output_extension = "so"
part_name = "runtime_core"
@ -670,18 +669,18 @@ ohos_source_set("abckit_ets_vm_helpers") {
sources = [ "helpers/helpers_ets_runtime.cpp" ]
include_dirs = [
"$ark_root",
"$ark_root/libabckit/src",
"$ark_root_dynamic",
"$abckit_root/src",
]
etsstdlib =
rebase_path(get_label_info("$ark_root/static_core/plugins/ets:etsstdlib",
rebase_path(get_label_info("$ark_root_static/plugins/ets:etsstdlib",
"target_gen_dir")) + "/etsstdlib.abc"
defines = [ "ABCKIT_ETS_STD_LIB=\"${etsstdlib}\"" ]
deps = [
"$ark_root/static_core/plugins/ets:etsstdlib",
"$ark_root/static_core/runtime:libarkruntime",
"$ark_root_static/plugins/ets:etsstdlib",
"$ark_root_static/runtime:libarkruntime",
]
output_extension = "so"

View File

@ -14,7 +14,7 @@
*/
#include "helpers_runtime.h"
#include "libabckit/src/logger.h"
#include "logger.h"
#include "ecmascript/napi/include/jsnapi.h"
#include <iostream>

View File

@ -1,58 +0,0 @@
# Copyright (c) 2024 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import("//arkcompiler/runtime_core/ark_root.gni")
import("$build_root/test.gni")
module_output_path = "arkcompiler/runtime_core/libabckit"
template("host_unittest_action") {
_target_name_ = "${target_name}"
# unittest for phone running
ohos_unittest(_target_name_) {
forward_variables_from(invoker, "*")
}
_module_out_path_ = invoker.module_out_path
# unittest for host running
action("${_target_name_}Action") {
testonly = true
_host_test_target_ = ":${_target_name_}(${host_toolchain})"
_root_out_dir_ = get_label_info(_host_test_target_, "root_out_dir")
deps = [ _host_test_target_ ]
script = "//arkcompiler/ets_runtime/script/run_ark_executable.py"
args = [
"--script-file",
rebase_path(_root_out_dir_) +
"/tests/unittest/${_module_out_path_}/${_target_name_}",
"--expect-output",
"0",
"--env-path",
rebase_path(_root_out_dir_) + "/arkcompiler/runtime_core:" +
rebase_path(_root_out_dir_) + "/arkcompiler/ets_runtime:" +
rebase_path(_root_out_dir_) + "/arkcompiler/ets_frontend:" +
rebase_path(_root_out_dir_) + "/thirdparty/icu:" +
rebase_path(_root_out_dir_) + "/thirdparty/zlib:",
"--timeout-limit",
"1200",
]
outputs = [ "$target_out_dir/${_target_name_}/" ]
}
}

View File

@ -50,7 +50,7 @@ declare_args() {
}
if (ark_static_standalone_build) {
enable_libabckit = false
abckit_enable = false
}
}

View File

@ -67,20 +67,26 @@ libarkassembler_configs = [
]
libarkassembler_configs += plugin_libarkassembler_configs
group("arktsassembler_header_deps") {
deps = [
":ark_asm_meta_gen_h",
":ark_asm_register_extensions_h",
":isa_gen_libarkassembler_ins_create_api_h",
":isa_gen_libarkassembler_ins_emit_h",
":isa_gen_libarkassembler_isa_h",
":isa_gen_libarkassembler_opcode_parsing_h",
":isa_gen_libarkassembler_operand_types_print_h",
]
}
ohos_source_set("libarktsassembler_static") {
sources = libarkassembler_sources
public_configs = libarkassembler_configs
deps = [
":ark_asm_meta_gen_h",
":ark_asm_register_extensions_h",
":isa_gen_libarkassembler_ins_create_api_h",
":isa_gen_libarkassembler_ins_emit_h",
":arktsassembler_header_deps",
":isa_gen_libarkassembler_ins_to_string_cpp",
":isa_gen_libarkassembler_isa_h",
":isa_gen_libarkassembler_opcode_parsing_h",
":isa_gen_libarkassembler_operand_types_print_h",
"$ark_root/compiler:libarktscompiler",
"$ark_root/libpandabase:libarktsbase",
"$ark_root/libpandafile:libarktsfile",
@ -113,14 +119,8 @@ ohos_source_set("libarktsassembler_frontend_set_static") {
public_configs = libarkassembler_configs
deps = [
":ark_asm_meta_gen_h",
":ark_asm_register_extensions_h",
":isa_gen_libarkassembler_ins_create_api_h",
":isa_gen_libarkassembler_ins_emit_h",
":arktsassembler_header_deps",
":isa_gen_libarkassembler_ins_to_string_cpp",
":isa_gen_libarkassembler_isa_h",
":isa_gen_libarkassembler_opcode_parsing_h",
":isa_gen_libarkassembler_operand_types_print_h",
"$ark_root/libpandafile:libarktsfile_frontend_static",
"$ark_root/runtime:profiling_gen_profiling_gen_h",
]

View File

@ -24,7 +24,7 @@ if (ark_standalone_build) {
ohos_static_library("libarktsbytecodeopt_package") {
deps = []
if (enable_static_vm) {
if (enable_libabckit) {
if (abckit_enable) {
deps += [ ":libarktsbytecodeopt" ]
} else {
deps += [ ":libarktsbytecodeopt_frontend_static" ]
@ -71,11 +71,11 @@ libarkbytecodeopt_configs = [
libarkbytecodeopt_configs += plugin_bytecodeopt_configs
if (enable_libabckit && current_toolchain == host_toolchain) {
if (abckit_enable && current_toolchain == host_toolchain) {
libabckit_path = "$ark_root/../libabckit"
libabckit_deps = [
"$libabckit_path/src/templates/abckit_intrinsics:ark_gen_libabckit_abckit_intrinsics_inl",
"$libabckit_path/src/templates/abckit_intrinsics:ark_gen_libabckit_abckit_intrinsics_vreg_width_h",
"$libabckit_path/src/templates/abckit_intrinsics:abckit_ark_gen_abckit_intrinsics_inl",
"$libabckit_path/src/templates/abckit_intrinsics:abckit_ark_gen_abckit_intrinsics_vreg_width_h",
]
}
@ -102,7 +102,7 @@ ohos_shared_library("libarktsbytecodeopt") {
]
deps += plugin_bytecodeopt_deps
if (enable_libabckit && current_toolchain == host_toolchain) {
if (abckit_enable && current_toolchain == host_toolchain) {
deps += libabckit_deps
}
@ -141,7 +141,7 @@ ohos_static_library("libarktsbytecodeopt_frontend_static") {
deps += plugin_bytecodeopt_deps
if (enable_libabckit && current_toolchain == host_toolchain) {
if (abckit_enable && current_toolchain == host_toolchain) {
deps += libabckit_deps
}

View File

@ -50,7 +50,7 @@ config("arkcompiler_public_config") {
include_dirs += platform_include_dirs
if (enable_libabckit) {
if (abckit_enable) {
intrinsics_gen_dir =
get_label_info(":libarkcompiler_intrinsics_gen_inl(${host_toolchain})",
"target_gen_dir")
@ -61,7 +61,7 @@ config("arkcompiler_public_config") {
if (enable_bytecode_optimizer && plugin_enable_bytecode_optimizer) {
defines += [ "ENABLE_BYTECODE_OPT" ]
}
if (enable_libabckit) {
if (abckit_enable) {
defines += [ "ENABLE_LIBABCKIT" ]
}
@ -187,9 +187,9 @@ if (!is_mac) {
libarkcompiler_sources += [ "$target_gen_dir/generated/inst_builder_gen.cpp" ]
if (enable_libabckit && current_toolchain == host_toolchain) {
if (abckit_enable && current_toolchain == host_toolchain) {
libabckit_path = "$ark_root/../libabckit"
libabckit_deps = [ "$libabckit_path/src/templates/abckit_intrinsics:ark_gen_libabckit_inst_builder_abckit_intrinsics_inc" ]
libabckit_deps = [ "$libabckit_path/src/templates/abckit_intrinsics:abckit_ark_gen_inst_builder_abckit_intrinsics_inc" ]
libabckit_includes = [
"$libabckit_path",
"$libabckit_path/src/adapter_static",
@ -206,11 +206,7 @@ libarkcompiler_configs = [
"$ark_root/runtime:arkruntime_public_config",
]
ohos_shared_library("libarktscompiler") {
sources = libarkcompiler_sources
configs = libarkcompiler_configs
group("arktscompiler_header_deps") {
deps = [
":codegen_language_extensions_h",
":compiler_events_gen_h",
@ -231,7 +227,6 @@ ohos_shared_library("libarktscompiler") {
":intrinsics_lse_heap_inv_args_inl",
":intrinsics_peephole_inl_h",
":ir_dyn_base_types_h",
":isa_gen_libarkcompiler_inst_builder_gen_cpp",
":libarkcompiler_intrinsics_gen_inl_can_encode_builtin_inl",
":libarkcompiler_intrinsics_gen_inl_generate_operations_intrinsic_graph_inl",
":libarkcompiler_intrinsics_gen_inl_generate_operations_intrinsic_inst_inl",
@ -257,11 +252,9 @@ ohos_shared_library("libarktscompiler") {
":plugin_create_pipeline_inl",
":source_languages_h",
"$ark_root/cross_values:cross_values_getters_generate(${default_toolchain})",
"$ark_root/libpandabase:libarktsbase",
"$ark_root/libpandafile:isa_gen_libarkfile_bytecode_instruction-inl_gen_h",
"$ark_root/libpandafile:isa_gen_libarkfile_bytecode_instruction_enum_gen_h",
"$ark_root/libpandafile:libarkfile_type_gen_h",
"$ark_root/libpandafile:libarktsfile",
"$ark_root/runtime:arkruntime_gen_entrypoints_compiler_checksum_entrypoints_compiler_checksum_inl",
"$ark_root/runtime:arkruntime_gen_entrypoints_entrypoints_compiler_inl",
"$ark_root/runtime:arkruntime_gen_entrypoints_entrypoints_gen_S",
@ -273,6 +266,19 @@ ohos_shared_library("libarktscompiler") {
"$ark_root/runtime:plugins_entrypoints_gen_h",
"$ark_root/runtime/asm_defines:asm_defines_generator",
]
}
ohos_shared_library("libarktscompiler") {
sources = libarkcompiler_sources
configs = libarkcompiler_configs
deps = [
":arktscompiler_header_deps",
":isa_gen_libarkcompiler_inst_builder_gen_cpp",
"$ark_root/libpandabase:libarktsbase",
"$ark_root/libpandafile:libarktsfile",
]
external_deps = [ sdk_libc_secshared_dep ]
@ -295,7 +301,7 @@ ohos_shared_library("libarktscompiler") {
"$ark_root/compiler/optimizer/code_generator",
]
if (enable_libabckit && current_toolchain == host_toolchain) {
if (abckit_enable && current_toolchain == host_toolchain) {
include_dirs += libabckit_includes
deps += libabckit_deps
}
@ -315,66 +321,10 @@ ohos_source_set("libarktscompiler_frontend_static") {
configs = libarkcompiler_configs
deps = [
":codegen_language_extensions_h",
":compiler_events_gen_h",
":compiler_interface_extensions_inl_h",
":compiler_logger_components_inc",
":compiler_options_gen_h",
":cpu_features_gen_inc",
":inst_builder_extensions_inl_h",
":intrinsics_can_encode_inl",
":intrinsics_codegen_ext_inl_h",
":intrinsics_extensions_inl_h",
":intrinsics_graph_checker_inl",
":intrinsics_inline_inl_h",
":intrinsics_inline_native_method_inl",
":intrinsics_ir_build_inl_h",
":intrinsics_ir_build_static_call_inl",
":intrinsics_ir_build_virtual_call_inl",
":intrinsics_lse_heap_inv_args_inl",
":intrinsics_peephole_inl_h",
":ir_dyn_base_types_h",
":arktscompiler_header_deps",
":isa_gen_libarkcompiler_inst_builder_gen_cpp",
":libarkcompiler_intrinsics_gen_inl_can_encode_builtin_inl",
":libarkcompiler_intrinsics_gen_inl_generate_operations_intrinsic_graph_inl",
":libarkcompiler_intrinsics_gen_inl_generate_operations_intrinsic_inst_inl",
":libarkcompiler_intrinsics_gen_inl_get_intrinsics_inl",
":libarkcompiler_intrinsics_gen_inl_get_intrinsics_names_inl",
":libarkcompiler_intrinsics_gen_inl_intrinsic_codegen_test_inl",
":libarkcompiler_intrinsics_gen_inl_intrinsic_flags_test_inl",
":libarkcompiler_intrinsics_gen_inl_intrinsics_codegen_inl",
":libarkcompiler_intrinsics_gen_inl_intrinsics_codegen_inl_h",
":libarkcompiler_intrinsics_gen_inl_intrinsics_enum_inl",
":libarkcompiler_intrinsics_gen_inl_intrinsics_flags_inl",
":libarkcompiler_intrinsics_gen_inl_intrinsics_inline_inl",
":libarkcompiler_intrinsics_gen_inl_intrinsics_ir_build_inl",
":libarkcompiler_intrinsics_gen_inl_intrinsics_peephole_inl",
":libarkcompiler_opcodes_h_IR-instructions_md",
":libarkcompiler_opcodes_h_arch_info_gen_h",
":libarkcompiler_opcodes_h_codegen_arm64_gen_inc",
":libarkcompiler_opcodes_h_inst_checker_gen_h",
":libarkcompiler_opcodes_h_inst_flags_inl",
":libarkcompiler_opcodes_h_opcodes_h",
":libarkcompiler_opcodes_h_savestate_optimization_call_visitors_inl",
":pipeline_includes_h",
":plugin_create_pipeline_inl",
":source_languages_h",
"$ark_root/cross_values:cross_values_getters_generate(${default_toolchain})",
"$ark_root/libpandabase:libarktsbase_frontend_static",
"$ark_root/libpandafile:isa_gen_libarkfile_bytecode_instruction-inl_gen_h",
"$ark_root/libpandafile:isa_gen_libarkfile_bytecode_instruction_enum_gen_h",
"$ark_root/libpandafile:libarkfile_type_gen_h",
"$ark_root/libpandafile:libarktsfile_frontend_static",
"$ark_root/runtime:arkruntime_gen_entrypoints_compiler_checksum_entrypoints_compiler_checksum_inl",
"$ark_root/runtime:arkruntime_gen_entrypoints_entrypoints_compiler_inl",
"$ark_root/runtime:arkruntime_gen_entrypoints_entrypoints_gen_S",
"$ark_root/runtime:arkruntime_gen_entrypoints_entrypoints_gen_h",
"$ark_root/runtime:arkruntime_gen_intrinsics_intrinsics_enum_h",
"$ark_root/runtime:arkruntime_gen_intrinsics_intrinsics_gen_h",
"$ark_root/runtime:arkruntime_gen_intrinsics_intrinsics_h",
"$ark_root/runtime:arkruntime_gen_intrinsics_unimplemented_intrinsics-inl_cpp",
"$ark_root/runtime:plugins_entrypoints_gen_h",
"$ark_root/runtime/asm_defines:asm_defines_generator",
]
external_deps = [ sdk_libc_secshared_dep ]
@ -396,7 +346,7 @@ ohos_source_set("libarktscompiler_frontend_static") {
"$ark_root/compiler/optimizer/code_generator",
]
if (enable_libabckit && current_toolchain == host_toolchain) {
if (abckit_enable && current_toolchain == host_toolchain) {
include_dirs += libabckit_includes
deps += libabckit_deps
}
@ -422,7 +372,7 @@ ark_isa_gen("isa_gen_libarkcompiler") {
ark_gen("libarkcompiler_intrinsics_gen_inl") {
gen_runtime_path = "$target_gen_dir/../runtime"
if (enable_libabckit && current_toolchain == host_toolchain) {
if (abckit_enable && current_toolchain == host_toolchain) {
data = [ "$gen_runtime_path/abckit_intrinsics.yaml" ]
} else {
data = [ "$gen_runtime_path/intrinsics.yaml" ]
@ -451,12 +401,12 @@ ark_gen("libarkcompiler_intrinsics_gen_inl") {
]
requires = [ "$ark_root/libpandabase/utils.rb" ]
extra_dependencies = [ "$ark_root/runtime:arkruntime_gen_intrinsics_yaml" ]
if (enable_libabckit && current_toolchain == host_toolchain) {
if (abckit_enable && current_toolchain == host_toolchain) {
extra_dependencies += [
"$libabckit_path/src/templates/dyn_intrinsics:isa_gen_libabckit_dyn_intrinsics_enum_inc",
"$libabckit_path/src/templates/dyn_intrinsics:isa_gen_libabckit_get_dyn_intrinsics_names_inc",
"$libabckit_path/src/templates/dyn_intrinsics:isa_gen_libabckit_dyn_intrinsics_flags_inc",
"$libabckit_path:concat_abckit_intrinsics_yaml",
"$libabckit_path/src/templates/dyn_intrinsics:abckit_isa_gen_dyn_intrinsics_enum_inc",
"$libabckit_path/src/templates/dyn_intrinsics:abckit_isa_gen_get_dyn_intrinsics_names_inc",
"$libabckit_path/src/templates/dyn_intrinsics:abckit_isa_gen_dyn_intrinsics_flags_inc",
"$libabckit_path/src:abckit_concat_intrinsics_yaml",
]
}
}

View File

@ -193,16 +193,18 @@ libarkbase_configs = [
"$ark_root:ark_config",
]
libarkbase_deps = [
":base_options_h",
":coherency_line_size_h",
":events_gen",
":generate_version_file",
":logger_enum_gen_h",
":logger_impl_gen_h",
":plugins_regmasks_gen",
":source_language_gen",
]
group("arktsbase_header_deps") {
deps = [
":base_options_h",
":coherency_line_size_h",
":events_gen",
":generate_version_file",
":logger_enum_gen_h",
":logger_impl_gen_h",
":plugins_regmasks_gen",
":source_language_gen",
]
}
ohos_source_set("libarktsbase_static") {
sources = libarkbase_sources
@ -214,7 +216,7 @@ ohos_source_set("libarktsbase_static") {
public_configs = libarkbase_configs
deps = libarkbase_deps
deps = [ ":arktsbase_header_deps" ]
if (ark_static_standalone_build) {
deps += [ sdk_libc_secshared_dep ]
@ -242,7 +244,7 @@ ohos_source_set("libarktsbase_frontend_set_static") {
public_configs = libarkbase_configs
deps = libarkbase_deps
deps = [ ":arktsbase_header_deps" ]
external_deps = [ sdk_libc_secshared_dep ]

View File

@ -73,11 +73,7 @@ if (ark_static_standalone_build) {
libarkfile_configs += [ zlib_public_config ]
}
ohos_source_set("libarktsfile_static") {
sources = libarkfile_sources
public_configs = libarkfile_configs
group("arktsfile_header_deps") {
deps = [
":isa_gen_libarkfile_bytecode_emitter_def_gen_h",
":isa_gen_libarkfile_bytecode_emitter_gen_h",
@ -88,6 +84,16 @@ ohos_source_set("libarktsfile_static") {
":libarkfile_file_items_gen_inc",
":libarkfile_type_gen_h",
":source_lang_enum_h",
]
}
ohos_source_set("libarktsfile_static") {
sources = libarkfile_sources
public_configs = libarkfile_configs
deps = [
":arktsfile_header_deps",
"$ark_root/libpandabase:libarktsbase",
"$ark_root/libziparchive:libarktsziparchive",
]
@ -128,14 +134,7 @@ ohos_source_set("libarktsfile_frontend_set_static") {
public_configs = libarkfile_configs
deps = [
":isa_gen_libarkfile_bytecode_emitter_def_gen_h",
":isa_gen_libarkfile_bytecode_emitter_gen_h",
":isa_gen_libarkfile_bytecode_instruction-inl_gen_h",
":isa_gen_libarkfile_bytecode_instruction_enum_gen_h",
":isa_gen_libarkfile_file_format_version_h",
":isa_gen_libarkfile_tests_bytecode_emitter_tests_gen_h",
":libarkfile_file_items_gen_inc",
":libarkfile_type_gen_h",
":arktsfile_header_deps",
":source_lang_enum_h",
"$ark_root/libziparchive:libarktsziparchive_frontend_static",
]

View File

@ -681,7 +681,7 @@ ark_gen("arkruntime_gen_entrypoints_compiler_checksum") {
}
ark_gen("arkruntime_gen_intrinsics") {
if (enable_libabckit && current_toolchain == host_toolchain) {
if (abckit_enable && current_toolchain == host_toolchain) {
data = [ "$target_gen_dir/abckit_intrinsics.yaml" ]
} else {
data = [ "$target_gen_dir/intrinsics.yaml" ]
@ -697,9 +697,9 @@ ark_gen("arkruntime_gen_intrinsics") {
sources = "templates"
destination = "$target_gen_dir"
extra_dependencies = [ ":arkruntime_gen_intrinsics_yaml" ]
if (enable_libabckit && current_toolchain == host_toolchain) {
if (abckit_enable && current_toolchain == host_toolchain) {
extra_dependencies +=
[ "$ark_root/../libabckit:concat_abckit_intrinsics_yaml" ]
[ "$ark_root/../libabckit/src:abckit_concat_intrinsics_yaml" ]
}
}

View File

@ -18,7 +18,7 @@ if (!defined(ark_standalone_build)) {
ark_standalone_build = false
}
import("//arkcompiler/runtime_core/libabckit/libabckit_config.gni")
import("//arkcompiler/runtime_core/libabckit/abckit_config.gni")
if (ark_standalone_build) {
import("//arkcompiler/toolchain/build/config/sanitizers/sanitizers.gni")