• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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/faultloggerd/faultloggerd.gni")
15
16if (defined(ohos_lite)) {
17  executable("crasher_cpp") {
18    cflags = [
19      "-funwind-tables",
20      "-Wno-frame-larger-than",
21    ]
22    visibility = [ "*:*" ]
23    include_dirs = [
24      ".",
25      "$faultloggerd_path/common",
26      "//commonlibrary/c_utils/base/include",
27      "$hilog_lite_include_path",
28    ]
29    sources = [ "dfx_crasher.cpp" ]
30    deps = [
31      "$hilog_lite_deps_path",
32      "//third_party/bounds_checking_function:libsec_shared",
33    ]
34  }
35} else {
36  config("crasher_config") {
37    visibility = [ ":*" ]
38
39    include_dirs = [
40      ".",
41      "$faultloggerd_path/common",
42    ]
43
44    cflags = [
45      "-DHAS_HITRACE",
46      "-Wno-frame-larger-than",
47    ]
48  }
49
50  ohos_executable("crasher_cpp") {
51    configs = [
52      ":crasher_config",
53      "$faultloggerd_path/common/build:coverage_flags",
54    ]
55    sources = [ "dfx_crasher.cpp" ]
56
57    external_deps = [
58      "c_utils:utils",
59      "hilog:libhilog",
60      "hitrace:libhitracechain",
61    ]
62
63    part_name = "faultloggerd"
64    subsystem_name = "hiviewdfx"
65  }
66}
67