• 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("//build/ohos.gni")
15import("../../../build/ts.gni")
16OHOS_PROFILER_3RDPARTY_PROTOBUF_DIR = "${THIRD_PARTY}/protobuf"
17proto_dir = "${THIRD_PARTY}/protogen"
18mock_dir = "$proto_dir/types/plugins/mock_data"
19config("ts_proto_include_config") {
20  include_dirs = []
21}
22source_set("ts_proto_data_cpp") {
23  public_deps = [
24    "${OHOS_PROFILER_3RDPARTY_PROTOBUF_DIR}:protobuf_lite_static",
25    "${OHOS_PROFILER_3RDPARTY_PROTOBUF_DIR}:protobuf_static",
26  ]
27  cflags = [
28    "-ftrapv",
29    "-D_FORTIFY_SOURCE=2 -O2",
30    "-Wno-zero-length-array",
31    "-std=c++17",
32  ]
33
34  if (!is_win) {
35    print("xxx")
36    cflags += [
37      "-fPIE",
38      "-fPIC",
39    ]
40  }
41  if (!use_wasm) {
42    cflags += [
43      "-fstack-protector-strong",  #
44      "-fstack-protector-all",
45    ]
46  }
47
48  public_configs = [ ":ts_proto_include_config" ]
49  sources = [ "${mock_dir}/mock_plugin_result.pb.cc" ]
50}
51