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/libpandabase:arkbase_public_config", 23 "$ark_root/libpandafile:arkfile_public_config", 24 "$ark_root/compiler:arkcompiler_public_config", 25 ] 26} 27 28config("defectscanaux_test_config") { 29 visibility = [ ":*" ] 30 visibility += [ "./tests/unittest:*" ] 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 stack_protector_ret = false 60 sources = libarkdefectscanaux_sources 61 configs = [ ":defectscanaux_public_config" ] 62 63 deps = [ 64 ":defectscanaux_intrinsic_intrinsic_map_table_h", 65 ":defectscanaux_opcode_opcode_map_table_h", 66 "$ark_root/compiler:libarkcompiler_frontend_static", 67 "$ark_root/libpandabase:libarkbase_frontend_static", 68 "$ark_root/libpandafile:libarkfile_frontend_static", 69 sdk_libc_secshared_dep, 70 ] 71 72 output_extension = "so" 73 relative_install_dir = "ark" 74 part_name = "runtime_core" 75 subsystem_name = "arkcompiler" 76} 77 78ohos_static_library("libark_defect_scan_aux_static_test") { 79 stack_protector_ret = false 80 sources = libarkdefectscanaux_sources 81 configs = [ ":defectscanaux_public_config" ] 82 83 deps = [ 84 ":defectscanaux_intrinsic_intrinsic_map_table_h", 85 ":defectscanaux_opcode_opcode_map_table_h", 86 "$ark_root/compiler:libarkcompiler_frontend_static", 87 "$ark_root/libpandabase:libarkbase_frontend_static", 88 "$ark_root/libpandafile:libarkfile_frontend_static", 89 sdk_libc_secshared_dep, 90 ] 91 92 part_name = "runtime_core" 93 subsystem_name = "arkcompiler" 94} 95