• 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_interfaces_path/common",
27      "$faultloggerd_path/example",
28      "$hilog_lite_include_path",
29    ]
30    sources = [ "dfx_crasher.c" ]
31    deps = [ "$hilog_lite_deps_path" ]
32
33    external_deps = [ "bounds_checking_function:libsec_shared" ]
34  }
35} else {
36  config("crasher_config") {
37    visibility = [ ":*" ]
38
39    include_dirs = [
40      ".",
41      "$faultloggerd_interfaces_path/common",
42      "$faultloggerd_path/example",
43    ]
44    cflags = [ "-Wno-frame-larger-than" ]
45    cflags_c = [ "-Wno-frame-larger-than" ]
46    cflags_cc = [ "-Wno-frame-larger-than" ]
47    ldflags = [ "-Wno-frame-larger-than" ]
48  }
49
50  ohos_executable("crasher_c") {
51    configs = [
52      ":crasher_config",
53      "$faultloggerd_path/common/build:coverage_flags",
54    ]
55
56    branch_protector_ret = "pac_ret"
57    sources = [ "dfx_crasher.c" ]
58    external_deps = [ "hilog:libhilog" ]
59    part_name = "faultloggerd"
60    subsystem_name = "hiviewdfx"
61  }
62}
63