• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2021-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#
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_c") {
18    cflags = [
19      "-funwind-tables",
20      "-Wno-frame-larger-than",
21    ]
22
23    visibility = [ "*:*" ]
24    include_dirs = [
25      ".",
26      "$faultloggerd_path/common",
27      "//commonlibrary/c_utils/base/include",
28      "$hilog_lite_include_path",
29    ]
30    sources = [ "dfx_crasher.c" ]
31    deps = [
32      "$hilog_lite_deps_path",
33      "//third_party/bounds_checking_function:libsec_shared",
34    ]
35  }
36} else {
37  config("crasher_config") {
38    visibility = [ ":*" ]
39
40    include_dirs = [
41      ".",
42      "$faultloggerd_path/common",
43    ]
44    cflags = [ "-Wno-frame-larger-than" ]
45  }
46
47  ohos_executable("crasher_c") {
48    configs = [
49      ":crasher_config",
50      "$faultloggerd_path/common/build:coverage_flags",
51    ]
52    sources = [ "dfx_crasher.c" ]
53    external_deps = [ "hilog:libhilog" ]
54    part_name = "faultloggerd"
55    subsystem_name = "hiviewdfx"
56  }
57}
58