# Copyright (c) 2022 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") config("defectscanaux_public_config") { include_dirs = [ "$target_gen_dir/generated", "$ark_root/libark_defect_scan_aux/include", ] configs = [ "$ark_root:ark_config", "$ark_root/libpandabase:arkbase_public_config", "$ark_root/libpandafile:arkfile_public_config", "$ark_root/compiler:arkcompiler_public_config", ] defines = [ "IR_FOR_LIBARK_DEFECT_SCAN_AUX" ] } config("defectscanaux_test_config") { visibility = [ ":*" ] visibility += [ "./tests/unittest:*" ] configs = [ ":defectscanaux_public_config" ] } libarkdefectscanaux_sources = [ "$ark_root/libark_defect_scan_aux/abc_file.cpp", "$ark_root/libark_defect_scan_aux/callee_info.cpp", "$ark_root/libark_defect_scan_aux/class.cpp", "$ark_root/libark_defect_scan_aux/function.cpp", "$ark_root/libark_defect_scan_aux/graph.cpp", "$ark_root/libark_defect_scan_aux/module_record.cpp", ] ark_gen("defectscanaux_opcode") { data = "$ark_root/compiler/optimizer/ir/instructions.yaml" template_files = [ "opcode_map_table.h.erb" ] sources = "templates" destination = "$target_gen_dir/generated" requires = [ "$ark_root/compiler/optimizer/templates/instructions.rb" ] } ark_isa_gen("defectscanaux_intrinsic") { template_files = [ "intrinsic_map_table.h.erb" ] sources = "templates" destination = "$target_gen_dir/generated" } ohos_shared_library("libark_defect_scan_aux") { stack_protector_ret = false sources = libarkdefectscanaux_sources configs = [ ":defectscanaux_public_config" ] deps = [ ":defectscanaux_intrinsic_intrinsic_map_table_h", ":defectscanaux_opcode_opcode_map_table_h", "$ark_root/compiler:libarkcompiler_frontend_static_for_libark_defect_scan_aux", "$ark_root/libpandabase:libarkbase_frontend_static", "$ark_root/libpandafile:libarkfile_frontend_static", sdk_libc_secshared_dep, ] output_extension = "so" relative_install_dir = "ark" part_name = "runtime_core" subsystem_name = "arkcompiler" } ohos_static_library("libark_defect_scan_aux_static_test") { stack_protector_ret = false sources = libarkdefectscanaux_sources configs = [ ":defectscanaux_public_config" ] deps = [ ":defectscanaux_intrinsic_intrinsic_map_table_h", ":defectscanaux_opcode_opcode_map_table_h", "$ark_root/compiler:libarkcompiler_frontend_static_for_libark_defect_scan_aux", "$ark_root/libpandabase:libarkbase_frontend_static", "$ark_root/libpandafile:libarkfile_frontend_static", sdk_libc_secshared_dep, ] part_name = "runtime_core" subsystem_name = "arkcompiler" }