1# Copyright (c) 2021-2022 Huawei Device Co., Ltd. 2# Licensed under the Apache License, Version 2.0 (the "License"); 3# you may not use this file except in compliance with the License. 4# You may obtain a copy of the License at 5# 6# http://www.apache.org/licenses/LICENSE-2.0 7# 8# Unless required by applicable law or agreed to in writing, software 9# distributed under the License is distributed on an "AS IS" BASIS, 10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11# See the License for the specific language governing permissions and 12# limitations under the License. 13 14import("//arkcompiler/runtime_core/ark_config.gni") 15import("$ark_root/verification/verification.gni") 16 17plugin_runtime_sources = [] 18plugin_runtime_configs = [] 19plugin_runtime_interpreter_impl_configs = [] 20arkruntime_header_plugin_deps = [] 21plugin_runtime_deps = [] 22 23runtime_yaml = [ 24 "runtime.yaml", 25 "$ark_root/irtoc/intrinsics.yaml", 26] 27foreach(plugin, enabled_plugins) { 28 print("add runtime plugin: $plugin") 29 plugin_dir = "$ark_root/plugins/$plugin" 30 plugin_runtime_configs += [ "$plugin_dir:runtime" ] 31 32 plugin_runtime_interpreter_impl_configs += 33 [ "$plugin_dir:runtime_interpreter_impl" ] 34 35 source_files = read_file("$plugin_dir/subproject_sources.gn", "scope") 36 37 if (defined(source_files.arkruntime_header_sub_deps)) { 38 foreach(sub_dep, source_files.arkruntime_header_sub_deps) { 39 arkruntime_header_plugin_deps += [ "$plugin_dir/$sub_dep" ] 40 } 41 } 42 43 if (defined(source_files.arkruntime_deps)) { 44 foreach(sub_dep, source_files.arkruntime_deps) { 45 plugin_runtime_deps += [ "$plugin_dir/$sub_dep" ] 46 } 47 } 48 49 if (defined(source_files.srcs_runtime_path)) { 50 source_file = "$plugin_dir/${source_files.srcs_runtime_path}" 51 src_scope = read_file(source_file, "scope") 52 53 if (defined(src_scope.srcs)) { 54 foreach(src, src_scope.srcs) { 55 plugin_runtime_sources += [ "$plugin_dir/runtime/$src" ] 56 } 57 } 58 59 if (defined(src_scope.runtime_yamls)) { 60 foreach(yaml_file, src_scope.runtime_yamls) { 61 runtime_yaml += [ "$plugin_dir/runtime/$yaml_file" ] 62 } 63 } 64 65 if (current_cpu == "arm" && defined(src_scope.srcs_arm)) { 66 foreach(src, src_scope.srcs_arm) { 67 plugin_runtime_sources += [ "$plugin_dir/runtime/$src" ] 68 } 69 } else if (current_cpu == "arm64" && defined(src_scope.srcs_arm64)) { 70 foreach(src, src_scope.srcs_arm64) { 71 plugin_runtime_sources += [ "$plugin_dir/runtime/$src" ] 72 } 73 } else if (current_cpu == "amd64" || current_cpu == "x64" || 74 current_cpu == "x86_64") { 75 if (defined(src_scope.srcs_x86)) { 76 foreach(src, src_scope.srcs_x86) { 77 plugin_runtime_sources += [ "$plugin_dir/runtime/$src" ] 78 } 79 } 80 } 81 82 src_scope = { 83 } 84 } 85 source_files = [] 86} 87 88config("arkruntime_public_config") { 89 include_dirs = [ 90 "$ark_root/runtime", 91 get_label_info( 92 "$ark_root/cross_values:cross_values_getters_generate(${default_toolchain})", 93 "target_gen_dir"), 94 "$target_gen_dir", 95 "$target_gen_dir/generated", 96 "$target_gen_dir/include", 97 ] 98 99 include_dirs += platform_include_dirs 100 101 configs = [ 102 "$ark_root/verification/gen:verification_public_config", 103 "$ark_root/compiler:arkcompiler_public_config", 104 ] 105 configs += plugin_runtime_configs 106} 107 108config("arkruntime_config") { 109 include_dirs = [ 110 "$ark_root/compiler", 111 "$ark_root/libpandabase", 112 "$ark_root/libpandafile", 113 "$ark_root/dprof/libdprof", 114 ] 115 116 cflags_cc = [ 117 "-Wno-invalid-offsetof", 118 "-Wno-unused-parameter", 119 ] 120 121 if (current_cpu == "arm64") { 122 asmflags = [ "-march=armv8-a+crc" ] 123 } 124} 125 126group("arkruntime_header_deps") { 127 deps = [ 128 ":arkruntime_gen_entrypoints_entrypoints_gen_S", 129 ":arkruntime_gen_entrypoints_entrypoints_gen_h", 130 ":arkruntime_gen_intrinsics_intrinsics_enum_h", 131 ":arkruntime_gen_intrinsics_intrinsics_gen_h", 132 ":arkruntime_gen_intrinsics_intrinsics_h", 133 ":arkruntime_gen_intrinsics_unimplemented_intrinsics-inl_cpp", 134 ":arkruntime_gen_intrinsics_yaml", 135 ":intrinsics_inl_h", 136 ":isa_gen_libarkruntime_interpreter-inl_gen_h", 137 ":isa_gen_libarkruntime_irtoc_interpreter_utils_h", 138 ":isa_gen_libarkruntime_isa_constants_gen_h", 139 ":isa_gen_libarkruntime_unimplemented_handlers-inl_h", 140 ":language_config_gen_inc", 141 ":libarkruntime_options_gen_h", 142 ":libarkruntime_shorty_values_h", 143 ":plugins_asm_defines_def", 144 ":plugins_defines_h", 145 ":plugins_entrypoints_gen_h", 146 ":plugins_inc", 147 ":plugins_interpreters_inl_h", 148 "$ark_root/libpandabase:base_options_h", 149 "$ark_root/verification/gen:isa_gen_verification_gen_abs_int_inl_gen_h", 150 "$ark_root/verification/gen:isa_gen_verification_gen_cflow_iterate_inl_gen_h", 151 "$ark_root/verification/gen:isa_gen_verification_gen_job_fill_gen_h", 152 "$ark_root/verification/gen:lang_specifics_h", 153 "$ark_root/verification/gen:verification_abs_int_inl_compat_checks_h", 154 "$ark_root/verification/gen:verification_verifier_messages_h", 155 ] 156 157 deps += arkruntime_header_plugin_deps 158} 159 160source_set("libarkruntime_set_static") { 161 sources = [ 162 "arch/asm_support.cpp", 163 "assert_gc_scope.cpp", 164 "bridge/bridge.cpp", 165 "cframe.cpp", 166 "cha.cpp", 167 "class.cpp", 168 "class_helper.cpp", 169 "class_initializer.cpp", 170 "class_linker.cpp", 171 "class_linker_extension.cpp", 172 "compiler.cpp", 173 "coretypes/array.cpp", 174 "coretypes/string.cpp", 175 "deoptimization.cpp", 176 "entrypoints/entrypoints.cpp", 177 "exceptions.cpp", 178 "field.cpp", 179 "file_manager.cpp", 180 "gc_task.cpp", 181 "global_object_lock.cpp", 182 "handle_scope.cpp", 183 "imtable_builder.cpp", 184 "interpreter/interpreter.cpp", 185 "interpreter/runtime_interface.cpp", 186 "intrinsics.cpp", 187 "language_context.cpp", 188 "loadable_agent.cpp", 189 "lock_order_graph.cpp", 190 "locks.cpp", 191 "mark_word.cpp", 192 "mem/allocator.cpp", 193 "mem/gc/bitmap.cpp", 194 "mem/gc/card_table.cpp", 195 "mem/gc/epsilon/epsilon.cpp", 196 "mem/gc/epsilon/epsilon_barrier.cpp", 197 "mem/gc/g1/g1-allocator.cpp", 198 "mem/gc/g1/g1-gc.cpp", 199 "mem/gc/g1/update_remset_thread.cpp", 200 "mem/gc/gc-hung/gc_hung.cpp", 201 "mem/gc/gc.cpp", 202 "mem/gc/gc_adaptive_stack.cpp", 203 "mem/gc/gc_barrier_set.cpp", 204 "mem/gc/gc_queue.cpp", 205 "mem/gc/gc_root.cpp", 206 "mem/gc/gc_root_type.cpp", 207 "mem/gc/gc_scope.cpp", 208 "mem/gc/gc_scoped_phase.cpp", 209 "mem/gc/gc_settings.cpp", 210 "mem/gc/gc_stats.cpp", 211 "mem/gc/gc_trigger.cpp", 212 "mem/gc/gc_workers_thread_pool.cpp", 213 "mem/gc/gen-gc/gen-gc.cpp", 214 "mem/gc/generational-gc-base.cpp", 215 "mem/gc/heap-space-misc/crossing_map.cpp", 216 "mem/gc/heap-space-misc/crossing_map_singleton.cpp", 217 "mem/gc/hybrid-gc/hybrid_object_allocator.cpp", 218 "mem/gc/lang/gc_lang.cpp", 219 "mem/gc/stw-gc/stw-gc.cpp", 220 "mem/heap_manager.cpp", 221 "mem/heap_space.cpp", 222 "mem/heap_verifier.cpp", 223 "mem/internal_allocator.cpp", 224 "mem/mem_stats.cpp", 225 "mem/mem_stats_additional_info.cpp", 226 "mem/mem_stats_default.cpp", 227 "mem/memory_manager.cpp", 228 "mem/object_helpers.cpp", 229 "mem/panda_string.cpp", 230 "mem/refstorage/global_object_storage.cpp", 231 "mem/refstorage/ref_block.cpp", 232 "mem/refstorage/reference_storage.cpp", 233 "mem/region_space.cpp", 234 "mem/rendezvous.cpp", 235 "mem/runslots.cpp", 236 "mem/tlab.cpp", 237 "method.cpp", 238 "methodtrace/trace.cpp", 239 "monitor.cpp", 240 "monitor_object_lock.cpp", 241 "monitor_pool.cpp", 242 "object_accessor.cpp", 243 "object_header.cpp", 244 "osr.cpp", 245 "panda_vm.cpp", 246 "plugins.cpp", 247 "relayout_profiler.cpp", 248 "runtime.cpp", 249 "runtime_controller.cpp", 250 "runtime_helpers.cpp", 251 "stack_walker.cpp", 252 "string_table.cpp", 253 "thread.cpp", 254 "thread_manager.cpp", 255 "time_utils.cpp", 256 "timing.cpp", 257 "tooling/debug_inf.cpp", 258 "tooling/debugger.cpp", 259 "tooling/pt_thread.cpp", 260 "vtable_builder.cpp", 261 ] 262 263 if (!is_mingw) { 264 sources += [ "dprofiler/dprofiler.cpp" ] 265 } 266 267 # irtoc_lib is enabled only for arm64 target for now, because Realease build doesn't support 268 # asmjit, needed for compiling of irtoc code for x86_64 target. 269 if (current_cpu == "arm64") { 270 sources += [ "$root_gen_dir/generated/irtoc_lib.o" ] 271 } 272 if (current_cpu == "arm") { 273 sources += [ 274 "arch/arm/interpreter_support.S", 275 "arch/arm/osr_arm.S", 276 "bridge/arch/arm/compiled_code_to_interpreter_bridge_dyn_arm.S", 277 "bridge/arch/arm/compiled_code_to_runtime_bridge_arm.S", 278 "bridge/arch/arm/deoptimization_arm.S", 279 "bridge/arch/arm/interpreter_to_compiled_code_bridge_dyn_arm.S", 280 ] 281 if (arm_float_abi == "softfp") { 282 sources += [ 283 "bridge/arch/arm/compiled_code_to_interpreter_bridge_arm.S", 284 "bridge/arch/arm/interpreter_to_compiled_code_bridge_arm.S", 285 ] 286 } else if (arm_float_abi == "hard") { 287 sources += [ 288 "bridge/arch/arm/compiled_code_to_interpreter_bridge_armhf.S", 289 "bridge/arch/arm/interpreter_to_compiled_code_bridge_armhf.S", 290 ] 291 } else { 292 print("Unsupported arm float abi type") 293 sources += [ 294 "bridge/arch/arm/compiled_code_to_interpreter_bridge_armsf.S", 295 "bridge/arch/arm/interpreter_to_compiled_code_bridge_arm.S", 296 ] 297 } 298 } else if (current_cpu == "arm64") { 299 sources += [ 300 "arch/aarch64/interpreter_support.S", 301 "arch/aarch64/osr_aarch64.S", 302 "bridge/arch/aarch64/compiled_code_to_interpreter_bridge_aarch64.S", 303 "bridge/arch/aarch64/compiled_code_to_interpreter_bridge_dyn_aarch64.S", 304 "bridge/arch/aarch64/compiled_code_to_runtime_bridge_aarch64.S", 305 "bridge/arch/aarch64/deoptimization_aarch64.S", 306 "bridge/arch/aarch64/interpreter_to_compiled_code_bridge_aarch64.S", 307 "bridge/arch/aarch64/interpreter_to_compiled_code_bridge_dyn_aarch64.S", 308 ] 309 } else if (current_cpu == "x86") { 310 sources += [ 311 "arch/x86/interpreter_support.S", 312 "arch/x86/osr_x86.S", 313 "bridge/arch/x86/compiled_code_to_interpreter_bridge_x86.S", 314 "bridge/arch/x86/deoptimization_x86.S", 315 "bridge/arch/x86/interpreter_to_compiled_code_bridge_x86.S", 316 ] 317 } else if (current_cpu == "amd64" || current_cpu == "x64" || 318 current_cpu == "x86_64") { 319 sources += [ 320 "arch/amd64/common_amd64.S", 321 "arch/amd64/interpreter_support.S", 322 "arch/amd64/osr_amd64.S", 323 "bridge/arch/amd64/compiled_code_to_interpreter_bridge_amd64.S", 324 "bridge/arch/amd64/compiled_code_to_interpreter_bridge_dyn_amd64.S", 325 "bridge/arch/amd64/compiled_code_to_runtime_bridge_amd64.S", 326 "bridge/arch/amd64/deoptimization_amd64.S", 327 "bridge/arch/amd64/interpreter_to_compiled_code_bridge_amd64.S", 328 "bridge/arch/amd64/interpreter_to_compiled_code_bridge_dyn_amd64.S", 329 ] 330 } 331 332 if (!is_mob || target_os == "ios") { 333 sources += [ 334 "$ark_root/platforms/common/runtime/thread.cpp", 335 "$ark_root/platforms/common/runtime/verify_app_install.cpp", 336 ] 337 } 338 339 core_vm_sources = [ 340 "core/core_class_linker_extension.cpp", 341 "core/core_language_context.cpp", 342 "core/core_vm.cpp", 343 ] 344 345 sources += core_vm_sources 346 sources += verifier_sources 347 sources += plugin_runtime_sources 348 349 public_configs = [ 350 "$ark_root:ark_config", 351 "$ark_root/libpandabase:arkbase_public_config", 352 "$ark_root/libpandafile:arkfile_public_config", 353 "$ark_root/compiler:arkcompiler_public_config", 354 "$ark_root/verification/gen:verification_public_config", 355 sdk_libc_secshared_config, 356 ":arkruntime_public_config", 357 ":arkruntime_config", 358 "$ark_root/runtime/asm_defines:asmdefines_public_config", 359 ] 360 361 deps = [ 362 ":arkruntime_header_deps", 363 ":arkruntime_interpreter_impl", 364 "$ark_root/compiler:libarkcompiler", 365 "$ark_root/compiler:libarkcompiler_intrinsics_gen_inl_entrypoints_bridge_asm_macro_inl", 366 "$ark_root/compiler:libarkcompiler_intrinsics_gen_inl_intrinsics_enum_inl", 367 "$ark_root/compiler/aot:libarkaotmanager", 368 "$ark_root/cross_values:cross_values_getters_generate(${default_toolchain})", 369 "$ark_root/libpandabase:libarkbase", 370 "$ark_root/libpandafile:libarkfile", 371 "$ark_root/libpandafile:libarkfile_type_gen_h", 372 "$ark_root/libziparchive:libarkziparchive", 373 "$ark_root/runtime/asm_defines:asm_defines_generator", 374 sdk_libc_secshared_dep, 375 ] 376 377 deps += plugin_runtime_deps 378 379 if (!is_mingw) { 380 deps += [ "$ark_root/dprof:libdprof" ] 381 } 382 383 if (current_cpu == "arm64") { 384 deps += [ "$ark_root/irtoc:irtoc_generate" ] 385 } 386 387 if (current_cpu == "arm") { 388 deps += [ 389 ":bridge_dispatch_arm", 390 ":bridge_dispatch_dyn_arm", 391 ] 392 } else if (current_cpu == "arm64") { 393 deps += [ 394 ":bridge_dispatch_aarch64", 395 ":bridge_dispatch_dyn_aarch64", 396 ] 397 } else if (current_cpu == "amd64" || current_cpu == "x64" || 398 current_cpu == "x86_64") { 399 deps += [ 400 ":bridge_dispatch_amd64", 401 ":bridge_dispatch_dyn_amd64", 402 ] 403 } 404} 405 406ohos_static_library("libarkruntime_static") { 407 deps = [ ":libarkruntime_set_static" ] 408 409 output_extension = "a" 410 part_name = "runtime_core" 411 subsystem_name = "arkcompiler" 412} 413 414ohos_shared_library("libarkruntime") { 415 deps = [ ":libarkruntime_static" ] 416 417 if (current_cpu == "amd64" || current_cpu == "x64" || 418 current_cpu == "x86_64") { 419 ldflags = [ "-latomic" ] 420 } 421 422 output_extension = "so" 423 if (!is_standard_system) { 424 relative_install_dir = "ark" 425 } 426 part_name = "runtime_core" 427 subsystem_name = "arkcompiler" 428} 429 430config("arkruntime_interpreter_impl_config") { 431 include_dirs = [ 432 "$ark_root/compiler", 433 "$ark_root/libpandabase", 434 "$ark_root/libpandafile", 435 "$ark_root/runtime", 436 "$ark_root/dprof/libdprof", 437 get_label_info( 438 "$ark_root/cross_values:cross_values_getters_generate(${default_toolchain})", 439 "target_gen_dir"), 440 "$target_gen_dir", 441 "$target_gen_dir/generated", 442 "$target_gen_dir/include", 443 ] 444 445 include_dirs += platform_include_dirs 446 447 configs = plugin_runtime_interpreter_impl_configs 448 449 cflags_cc = [ 450 "-Wno-invalid-offsetof", 451 "-Wno-unused-parameter", 452 ] 453 defines = [] 454 455 if (ark_enable_global_register_variables) { 456 if (current_cpu == "arm64") { 457 cflags_cc += [ 458 "-ffixed-x20", 459 "-ffixed-x21", 460 "-ffixed-x22", 461 "-ffixed-x23", 462 "-ffixed-x24", 463 "-ffixed-x25", 464 "-ffixed-x28", 465 ] 466 defines += [ "FFIXED_REGISTERS" ] 467 } 468 } 469} 470 471source_set("arkruntime_interpreter_impl_static") { 472 sources = [ "interpreter/interpreter_impl.cpp" ] 473 474 public_configs = [ 475 "$ark_root:ark_config", 476 "$ark_root/libpandabase:arkbase_public_config", 477 "$ark_root/libpandafile:arkfile_public_config", 478 "$ark_root/compiler:arkcompiler_public_config", 479 "$ark_root/verification/gen:verification_public_config", 480 sdk_libc_secshared_config, 481 ":arkruntime_interpreter_impl_config", 482 ] 483 484 deps = [ 485 ":arkruntime_header_deps", 486 "$ark_root/cross_values:cross_values_getters_generate(${default_toolchain})", 487 "$ark_root/libpandabase:libarkbase", 488 "$ark_root/libpandafile:libarkfile", 489 ] 490} 491 492ohos_static_library("arkruntime_interpreter_impl") { 493 deps = [ ":arkruntime_interpreter_impl_static" ] 494 495 part_name = "runtime_core" 496 subsystem_name = "arkcompiler" 497} 498 499template("gen_intrinsics_yaml") { 500 assert(defined(invoker.data_files), "data_files required!") 501 assert(defined(invoker.output_file), "output_file required!") 502 503 data_files = string_join(",", rebase_path(invoker.data_files, root_build_dir)) 504 template_file = "templates/intrinsics.yaml.erb" 505 506 action("$target_name") { 507 script = "$ark_root/runtime/templates/gen_intrinsics_data.rb" 508 509 # rerun action when data file or template file update 510 inputs = [ template_file ] 511 inputs += invoker.data_files 512 513 outputs = [ invoker.output_file ] 514 args = [ 515 rebase_path("templates/runtime.rb", root_build_dir), 516 "-d", 517 data_files, 518 "-t", 519 rebase_path(template_file, root_build_dir), 520 "-o", 521 rebase_path(outputs[0]), 522 ] 523 } 524} 525 526gen_intrinsics_yaml("arkruntime_gen_intrinsics_yaml") { 527 data_files = runtime_yaml 528 output_file = "$target_gen_dir/intrinsics.yaml" 529} 530 531gen_include_dir = "$target_gen_dir/include" 532 533ark_isa_gen("isa_gen_libarkruntime") { 534 template_files = [ 535 "interpreter-inl_gen.h.erb", 536 "isa_constants_gen.h.erb", 537 "unimplemented_handlers-inl.h.erb", 538 "irtoc_interpreter_utils.h.erb", 539 ] 540 sources = "interpreter/templates" 541 destination = gen_include_dir 542} 543 544isa = "$root_gen_dir/isa/isa.yaml" 545isa_api = "$ark_root/isa/isapi.rb" 546bridge_dispatch_template = "templates/bridge_dispatch.S.erb" 547bridge_dispatch_dyn_template = "templates/bridge_dispatch_dyn.S.erb" 548bridge_archs = [ 549 "aarch64", 550 "arm", 551 "armhf", 552 "amd64", 553 "x86", 554 "x86_64", 555 "x64", 556] 557foreach(arch, bridge_archs) { 558 ark_gen_file("bridge_dispatch_${arch}") { 559 data_file = isa 560 template_file = bridge_dispatch_template 561 output_file = "$gen_include_dir/bridge_dispatch_${arch}.S" 562 requires = [ 563 isa_api, 564 "templates/bridge_helpers_${arch}.rb", 565 "templates/bridge_helpers_common.rb", 566 "templates/bridge_helpers_static.rb", 567 ] 568 extra_dependencies = [ "$ark_root/isa:isa_combine" ] 569 } 570 571 ark_gen_file("bridge_dispatch_dyn_${arch}") { 572 data_file = isa 573 template_file = bridge_dispatch_dyn_template 574 output_file = "$gen_include_dir/bridge_dispatch_dyn_${arch}.S" 575 requires = [ 576 isa_api, 577 "templates/bridge_helpers_dynamic.rb", 578 "templates/bridge_helpers_common.rb", 579 "templates/bridge_helpers_${arch}.rb", 580 ] 581 extra_dependencies = [ "$ark_root/isa:isa_combine" ] 582 } 583} 584 585ark_gen("arkruntime_gen_entrypoints") { 586 data = "$target_gen_dir/entrypoints.yaml" 587 template_files = [ 588 "entrypoints_gen.h.erb", 589 "entrypoints_gen.S.erb", 590 "entrypoints_compiler.inl.erb", 591 ] 592 requires = [ 593 "$ark_root/templates/common.rb", 594 "entrypoints/entrypoints.rb", 595 ] 596 sources = "entrypoints" 597 destination = "$target_gen_dir/generated" 598 extra_dependencies = [ "$ark_root:concat_entrypoints_yamls" ] 599} 600 601ark_gen("arkruntime_gen_entrypoints_compiler_checksum") { 602 data = "entrypoints/entrypoints.yaml" 603 template_files = [ "entrypoints_compiler_checksum.inl.erb" ] 604 requires = [ "entrypoints/entrypoints.rb" ] 605 sources = "entrypoints" 606 destination = "$target_gen_dir/generated" 607 extra_dependencies = 608 [ "$ark_root/cross_values:cross_values_generate(${default_toolchain})" ] 609 extra_argv = [ rebase_path( 610 get_label_info( 611 "$ark_root/cross_values:cross_values_generate(${default_toolchain})", 612 "target_gen_dir"), 613 root_build_dir) ] 614} 615 616ark_gen("arkruntime_gen_intrinsics") { 617 data = "$target_gen_dir/intrinsics.yaml" 618 template_files = [ 619 "intrinsics_gen.h.erb", 620 "intrinsics.h.erb", 621 "intrinsics_enum.h.erb", 622 "unimplemented_intrinsics-inl.cpp.erb", 623 ] 624 requires = [ "templates/intrinsics.rb" ] 625 sources = "templates" 626 destination = "$target_gen_dir" 627 extra_dependencies = [ ":arkruntime_gen_intrinsics_yaml" ] 628} 629 630ark_gen_file("libarkruntime_options_gen_h") { 631 template_file = "../templates/options/options.h.erb" 632 data_file = "$target_gen_dir/../runtime_options.yaml" 633 requires = [ "../templates/common.rb" ] 634 output_file = "$target_gen_dir/generated/runtime_options_gen.h" 635 extra_dependencies = [ "$ark_root:merge_runtime_options_yamls" ] 636} 637 638ark_gen_file("libarkruntime_shorty_values_h") { 639 template_file = "templates/shorty_values.h.erb" 640 data_file = "../libpandafile/types.yaml" 641 requires = [ "../libpandafile/types.rb" ] 642 output_file = "$target_gen_dir/generated/shorty_values.h" 643} 644 645ark_gen_file("plugins_inc") { 646 extra_dependencies = [ "$ark_root:concat_plugins_yamls" ] 647 template_file = "templates/plugins.inc.erb" 648 data_file = "$target_gen_dir/../plugin_options.yaml" 649 requires = [ "$ark_root/templates/plugin_options.rb" ] 650 output_file = "$target_gen_dir/plugins.inc" 651} 652 653ark_gen_file("plugins_entrypoints_gen_h") { 654 extra_dependencies = [ "$ark_root:concat_plugins_yamls" ] 655 template_file = "entrypoints/plugins_entrypoints_gen.h.erb" 656 data_file = "$target_gen_dir/../plugin_options.yaml" 657 requires = [ "$ark_root/templates/plugin_options.rb" ] 658 output_file = "$target_gen_dir/plugins_entrypoints_gen.h" 659} 660 661ark_gen_file("plugins_interpreters_inl_h") { 662 extra_dependencies = [ "$ark_root:concat_plugins_yamls" ] 663 template_file = "templates/plugins_interpreters-inl.h.erb" 664 data_file = "$target_gen_dir/../plugin_options.yaml" 665 requires = [ "$ark_root/templates/plugin_options.rb" ] 666 output_file = "$target_gen_dir/plugins_interpreters-inl.h" 667} 668 669ark_gen_file("language_config_gen_inc") { 670 extra_dependencies = [ "$ark_root:concat_plugins_yamls" ] 671 template_file = "templates/language_config_gen.inc.erb" 672 data_file = "$target_gen_dir/../plugin_options.yaml" 673 requires = [ "$ark_root/templates/plugin_options.rb" ] 674 output_file = "$target_gen_dir/language_config_gen.inc" 675} 676 677ark_gen_file("intrinsics_inl_h") { 678 extra_dependencies = [ "$ark_root:concat_plugins_yamls" ] 679 template_file = "templates/intrinsics.inl.h.erb" 680 data_file = "$target_gen_dir/../plugin_options.yaml" 681 requires = [ "$ark_root/templates/plugin_options.rb" ] 682 output_file = "$target_gen_dir/intrinsics.inl.h" 683} 684 685ark_gen_file("plugins_defines_h") { 686 extra_dependencies = [ "$ark_root:concat_plugins_yamls" ] 687 template_file = "templates/plugins_defines.h.erb" 688 data_file = "$target_gen_dir/../plugin_options.yaml" 689 requires = [ "$ark_root/templates/plugin_options.rb" ] 690 output_file = "$target_gen_dir/plugins_defines.h" 691} 692 693ark_gen_file("plugins_asm_defines_def") { 694 extra_dependencies = [ "$ark_root:concat_plugins_yamls" ] 695 template_file = "templates/plugins_asm_defines.def.erb" 696 data_file = "$target_gen_dir/../plugin_options.yaml" 697 requires = [ "$ark_root/templates/plugin_options.rb" ] 698 output_file = "$target_gen_dir/plugins_asm_defines.def" 699} 700