1# Copyright (c) 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# http://www.apache.org/licenses/LICENSE-2.0 6# Unless required by applicable law or agreed to in writing, software 7# distributed under the License is distributed on an "AS IS" BASIS, 8# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 9# See the License for the specific language governing permissions and 10# limitations under the License. 11 12import("//arkcompiler/runtime_core/ark_config.gni") 13 14config("defectscanaux_public_config") { 15 include_dirs = [ 16 "$target_gen_dir/generated", 17 "$ark_root/libark_defect_scan_aux/include", 18 ] 19 20 configs = [ 21 "$ark_root:ark_config", 22 "$ark_root/runtime:arkruntime_public_config", 23 "$ark_root/libpandabase:arkbase_public_config", 24 "$ark_root/libpandafile:arkfile_public_config", 25 "$ark_root/compiler:arkcompiler_public_config", 26 ] 27} 28 29config("defectscanaux_test_config") { 30 visibility = [ ":*" ] 31 32 configs = [ ":defectscanaux_public_config" ] 33} 34 35libarkdefectscanaux_sources = [ 36 "$ark_root/libark_defect_scan_aux/abc_file.cpp", 37 "$ark_root/libark_defect_scan_aux/callee_info.cpp", 38 "$ark_root/libark_defect_scan_aux/class.cpp", 39 "$ark_root/libark_defect_scan_aux/function.cpp", 40 "$ark_root/libark_defect_scan_aux/graph.cpp", 41 "$ark_root/libark_defect_scan_aux/module_record.cpp", 42] 43 44ark_gen("defectscanaux_opcode") { 45 data = "$ark_root/compiler/optimizer/ir/instructions.yaml" 46 template_files = [ "opcode_map_table.h.erb" ] 47 sources = "templates" 48 destination = "$target_gen_dir/generated" 49 requires = [ "$ark_root/compiler/optimizer/templates/instructions.rb" ] 50} 51 52ark_isa_gen("defectscanaux_intrinsic") { 53 template_files = [ "intrinsic_map_table.h.erb" ] 54 sources = "templates" 55 destination = "$target_gen_dir/generated" 56} 57 58ohos_shared_library("libark_defect_scan_aux") { 59 sources = libarkdefectscanaux_sources 60 configs = [ ":defectscanaux_public_config" ] 61 62 deps = [ 63 ":defectscanaux_intrinsic_intrinsic_map_table_h", 64 ":defectscanaux_opcode_opcode_map_table_h", 65 "$ark_root/compiler:libarkcompiler_frontend_static", 66 "$ark_root/libpandabase:libarkbase_frontend_static", 67 "$ark_root/libpandafile:libarkfile_frontend_static", 68 sdk_libc_secshared_dep, 69 ] 70 71 output_extension = "so" 72 relative_install_dir = "ark" 73 part_name = "runtime_core" 74 subsystem_name = "arkcompiler" 75} 76 77ohos_static_library("libark_defect_scan_aux_static_test") { 78 sources = libarkdefectscanaux_sources 79 configs = [ ":defectscanaux_public_config" ] 80 81 deps = [ 82 ":defectscanaux_intrinsic_intrinsic_map_table_h", 83 ":defectscanaux_opcode_opcode_map_table_h", 84 "$ark_root/compiler:libarkcompiler_frontend_static", 85 "$ark_root/libpandabase:libarkbase_frontend_static", 86 "$ark_root/libpandafile:libarkfile_frontend_static", 87 sdk_libc_secshared_dep, 88 ] 89 90 part_name = "runtime_core" 91 subsystem_name = "arkcompiler" 92} 93