1# Copyright (c) 2021 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("//base/hiviewdfx/hiview/hiview.gni") 15import("//build/ohos.gni") 16 17config("smart_parser_config") { 18 visibility = [ "*:*" ] 19 20 include_dirs = [ 21 ".", 22 "include", 23 "../include", 24 "./rule/include", 25 "./feature_analysis/include", 26 ] 27} 28 29ohos_source_set("smart_parser") { 30 part_name = "hiview" 31 subsystem_name = "hiviewdfx" 32 sources = [ 33 "./feature_analysis/feature_analysis.cpp", 34 "./feature_analysis/log_util.cpp", 35 "./rule/compose_rule.cpp", 36 "./rule/extract_rule.cpp", 37 "./rule/rule.cpp", 38 "smart_parser.cpp", 39 ] 40 41 configs = [ ":smart_parser_config" ] 42 43 external_deps = [ 44 "c_utils:utils", 45 "hilog:libhilog", 46 "jsoncpp:jsoncpp", 47 ] 48 49 deps = [ 50 "$hiview_base:hiviewbase", 51 "config:config", 52 ] 53} 54 55ohos_source_set("smart_parser_with_cfi") { 56 sanitize = { 57 cfi = true 58 cfi_cross_dso = true 59 cfi_vcall_icall_only = true 60 debug = false 61 } 62 part_name = "hiview" 63 subsystem_name = "hiviewdfx" 64 sources = [ 65 "./feature_analysis/feature_analysis.cpp", 66 "./feature_analysis/log_util.cpp", 67 "./rule/compose_rule.cpp", 68 "./rule/extract_rule.cpp", 69 "./rule/rule.cpp", 70 "smart_parser.cpp", 71 ] 72 73 configs = [ ":smart_parser_config" ] 74 75 external_deps = [ 76 "c_utils:utils", 77 "hilog:libhilog", 78 "jsoncpp:jsoncpp", 79 ] 80 81 deps = [ 82 "$hiview_base:hiviewbase", 83 "config:config", 84 ] 85} 86 87group("moduletest") { 88 testonly = true 89 deps = [ "test:SmartParserModuleTest" ] 90} 91