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 defines = [ "IR_FOR_LIBARK_DEFECT_SCAN_AUX" ] 28} 29 30config("defectscanaux_test_config") { 31 visibility = [ ":*" ] 32 visibility += [ "./tests/unittest:*" ] 33 34 configs = [ ":defectscanaux_public_config" ] 35} 36 37libarkdefectscanaux_sources = [ 38 "$ark_root/libark_defect_scan_aux/abc_file.cpp", 39 "$ark_root/libark_defect_scan_aux/callee_info.cpp", 40 "$ark_root/libark_defect_scan_aux/class.cpp", 41 "$ark_root/libark_defect_scan_aux/function.cpp", 42 "$ark_root/libark_defect_scan_aux/graph.cpp", 43 "$ark_root/libark_defect_scan_aux/module_record.cpp", 44] 45 46ark_gen("defectscanaux_opcode") { 47 data = "$ark_root/compiler/optimizer/ir/instructions.yaml" 48 template_files = [ "opcode_map_table.h.erb" ] 49 sources = "templates" 50 destination = "$target_gen_dir/generated" 51 requires = [ "$ark_root/compiler/optimizer/templates/instructions.rb" ] 52} 53 54ark_isa_gen("defectscanaux_intrinsic") { 55 template_files = [ "intrinsic_map_table.h.erb" ] 56 sources = "templates" 57 destination = "$target_gen_dir/generated" 58} 59 60ohos_shared_library("libark_defect_scan_aux") { 61 stack_protector_ret = false 62 sources = libarkdefectscanaux_sources 63 configs = [ ":defectscanaux_public_config" ] 64 65 deps = [ 66 ":defectscanaux_intrinsic_intrinsic_map_table_h", 67 ":defectscanaux_opcode_opcode_map_table_h", 68 "$ark_root/compiler:libarkcompiler_frontend_static_for_libark_defect_scan_aux", 69 "$ark_root/libpandabase:libarkbase_frontend_static", 70 "$ark_root/libpandafile:libarkfile_frontend_static", 71 ] 72 73 external_deps = [ sdk_libc_secshared_dep ] 74 75 output_extension = "so" 76 relative_install_dir = "ark" 77 part_name = "runtime_core" 78 subsystem_name = "arkcompiler" 79} 80 81ohos_static_library("libark_defect_scan_aux_static_test") { 82 stack_protector_ret = false 83 sources = libarkdefectscanaux_sources 84 configs = [ ":defectscanaux_public_config" ] 85 86 deps = [ 87 ":defectscanaux_intrinsic_intrinsic_map_table_h", 88 ":defectscanaux_opcode_opcode_map_table_h", 89 "$ark_root/compiler:libarkcompiler_frontend_static_for_libark_defect_scan_aux", 90 "$ark_root/libpandabase:libarkbase_frontend_static", 91 "$ark_root/libpandafile:libarkfile_frontend_static", 92 ] 93 94 external_deps = [ sdk_libc_secshared_dep ] 95 96 part_name = "runtime_core" 97 subsystem_name = "arkcompiler" 98} 99