• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2024 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")
15if (defined(ohos_lite)) {
16  config("dfx_trace_config") {
17    visibility = [ "*:*" ]
18    include_dirs = [ "include" ]
19  }
20  source_set("dfx_trace_dlsym") {
21    public_configs = [ ":dfx_trace_config" ]
22    sources = [ "dfx_trace_dlsym.cpp" ]
23  }
24
25  source_set("dfx_trace") {
26    public_configs = [ ":dfx_trace_config" ]
27    sources = [ "dfx_trace.cpp" ]
28  }
29} else {
30  config("dfx_trace_config") {
31    visibility = [ "*:*" ]
32    include_dirs = [ "include" ]
33  }
34  ohos_source_set("dfx_trace_dlsym") {
35    public_configs = [ ":dfx_trace_config" ]
36    defines = [
37      "DFX_ENABLE_TRACE",
38      "is_ohos=${is_ohos}",
39      "is_mingw=${is_mingw}",
40    ]
41    sources = [ "dfx_trace_dlsym.cpp" ]
42    cflags = [ "-fstack-protector-strong" ]
43    if (is_ohos && !is_mingw) {
44      external_deps = [ "bounds_checking_function:libsec_shared" ]
45    }
46    part_name = "faultloggerd"
47    subsystem_name = "hiviewdfx"
48  }
49
50  ohos_source_set("dfx_trace_dlsym_static") {
51    public_configs = [ ":dfx_trace_config" ]
52    defines = [
53      "DFX_ENABLE_TRACE",
54      "is_ohos=${is_ohos}",
55      "is_mingw=${is_mingw}",
56    ]
57    sources = [ "dfx_trace_dlsym.cpp" ]
58    cflags = [ "-fstack-protector-strong" ]
59    if (is_ohos && !is_mingw) {
60      external_deps = [ "bounds_checking_function:libsec_static" ]
61    }
62    part_name = "faultloggerd"
63    subsystem_name = "hiviewdfx"
64  }
65
66  ohos_source_set("dfx_trace") {
67    public_configs = [ ":dfx_trace_config" ]
68    defines = [ "DFX_ENABLE_TRACE" ]
69    sources = [ "dfx_trace.cpp" ]
70    cflags = [ "-fstack-protector-strong" ]
71    external_deps = [
72      "bounds_checking_function:libsec_shared",
73      "hitrace:hitrace_meter",
74    ]
75    part_name = "faultloggerd"
76    subsystem_name = "hiviewdfx"
77  }
78}
79