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("//build/ohos.gni")
15import("//foundation/multimedia/player_framework/config.gni")
16
17config("media_service_log_dfx_public_config") {
18  cflags = [ "-DOHOS_MEDIA_LOG_DFX" ]
19  include_dirs = [ "//foundation/multimedia/player_framework/services/dfx" ]
20}
21
22ohos_shared_library("media_service_log_dfx") {
23  stack_protector_ret = true
24  install_enable = true
25
26  sanitize = {
27    integer_overflow = true
28    ubsan = true
29    boundary_sanitize = true
30    cfi = true
31    cfi_cross_dso = true
32    debug = false
33  }
34
35  sources = [ "dfx_log_dump.cpp" ]
36
37  include_dirs = [ "." ]
38
39  cflags = [
40    "-std=c++17",
41    "-fno-rtti",
42    "-fno-exceptions",
43    "-Wall",
44    "-fno-common",
45    "-fstack-protector-strong",
46    "-Wshadow",
47    "-FPIC",
48    "-FS",
49    "-O2",
50    "-D_FORTIFY_SOURCE=2",
51    "-fvisibility=hidden",
52    "-Wformat=2",
53    "-Wfloat-equal",
54    "-Wdate-time",
55    "-Werror",
56    "-Wextra",
57    "-Wimplicit-fallthrough",
58    "-Wsign-compare",
59    "-Wunused-parameter",
60  ]
61
62  external_deps = [
63    "c_utils:utils",
64    "hilog:libhilog",
65  ]
66
67  subsystem_name = "multimedia"
68  part_name = "player_framework"
69}
70
71ohos_shared_library("media_service_dfx") {
72  stack_protector_ret = true
73  install_enable = true
74
75  sanitize = {
76    integer_overflow = true
77    ubsan = true
78    boundary_sanitize = true
79    cfi = true
80    cfi_cross_dso = true
81    debug = false
82  }
83
84  sources = [ "service_dump_manager.cpp" ]
85
86  include_dirs = [
87    ".",
88    "//foundation/multimedia/player_framework/interfaces/inner_api/native",
89  ]
90
91  defines = []
92  defines += player_framework_defines
93
94  cflags = [
95    "-std=c++17",
96    "-fno-rtti",
97    "-fno-exceptions",
98    "-Wall",
99    "-fno-common",
100    "-fstack-protector-strong",
101    "-Wshadow",
102    "-FPIC",
103    "-FS",
104    "-O2",
105    "-D_FORTIFY_SOURCE=2",
106    "-fvisibility=hidden",
107    "-Wformat=2",
108    "-Wfloat-equal",
109    "-Wdate-time",
110    "-Werror",
111    "-Wextra",
112    "-Wimplicit-fallthrough",
113    "-Wsign-compare",
114    "-Wunused-parameter",
115  ]
116
117  external_deps = [
118    "c_utils:utils",
119    "hilog:libhilog",
120    "init:libbegetutil",
121    "media_foundation:media_foundation",
122  ]
123
124  subsystem_name = "multimedia"
125  part_name = "player_framework"
126}
127