1# Copyright (c) Huawei Technologies Co., Ltd. 2023. All rights reserved.
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
14declare_args() {
15  is_independent_compile = false
16  enable_hiperf = true
17  enable_ebpf = true
18  enable_native_hook = true
19  enable_hilog = true
20  enable_hisysevent = true
21  enable_arkts = true
22  enable_bytrace = true
23  enable_rawtrace = true
24  enable_htrace = true
25  enable_ffrt = true
26  enable_memory = true
27  enable_hidump = true
28  enable_cpudata = true
29  enable_network = true
30  enable_diskio = true
31  enable_process = true
32  enable_stream_extend = false
33}
34
35if (is_independent_compile) {
36  asdk_libs_dir = "."
37  host_toolchain = ""
38  PERF_DIR = "//third_party"
39  clang_x64_folder = "."
40  enable_ts_utest = target == "test"
41  TS_DIR = "//."
42  COMMON_LIBRARY = "//third_party/commonlibrary"
43} else {
44  PERF_DIR = "//developtools"
45  clang_x64_folder = "clang_x64"
46  is_test = false
47  is_protoc = false
48  is_spb = false
49  is_sdkdemo = false
50  is_sdkdemo_test = false
51  use_wasm = false
52  enable_ts_utest = false
53  is_fuzz = false
54  TS_DIR = "//developtools/smartperf_host/trace_streamer"
55  COMMON_LIBRARY = "//commonlibrary"
56}
57
58device_kernel_version = "default"
59OHOS_TRACE_STREAMER_PROTOS_DIR = get_path_info("../src", "abspath")
60
61OHOS_TRACE_STREAMER_DIR = get_path_info("../", "abspath")
62SRC = "${OHOS_TRACE_STREAMER_DIR}/src"
63EXTEND_SRC = "${OHOS_TRACE_STREAMER_DIR}/trace_extend/src"
64EXTEND_TEST = "${OHOS_TRACE_STREAMER_DIR}/trace_extend/test"
65PREBUILTS = "//prebuilts"
66THIRD_PARTY = "//third_party"
67kernel_version = "."
68
69OHOS_TRACE_STREAMER_DIR_PROTOC = get_path_info("./protoc.sh", "abspath")
70
71if (target_os == "windows") {
72  OHOS_TRACE_STREAMER_DIR_PROTOC = get_path_info("./protoc_w.py", "abspath")
73}
74
75OHOS_PROFILER_3RDPARTY_PROTOBUF_DIR = "${THIRD_PARTY}/protobuf"
76OHOS_PROFILER_3RDPARTY_GOOGLETEST_DIR = "${THIRD_PARTY}/googletest"
77OHOS_PROFILER_SUBSYS_NAME = "developtools"
78OHOS_PROFILER_PART_NAME = "smartperf_host"
79