xref: /developtools/hiperf/hiperf.gni (revision 48f512ce)
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
14hiperf_path = "//developtools/hiperf"
15
16innerkits_path = "${hiperf_path}/interfaces/innerkits"
17
18kits_path = "${hiperf_path}/interfaces/kits"
19
20hiperf_fuzz_test_output_path = "hiperf/hiperf"
21
22declare_args() {
23  hiperf_target_host = false
24  hiperf_target_static = false
25  hiperf_test_coverage = false
26  hiperf_test_fuzz = true
27  hiperf_sanitize = false
28  hiperf_check_time = false
29  hiperf_use_libunwind = false
30  hiperf_use_libunwinder = true
31  hiperf_debug = true
32  hiperf_code_analyze = false
33  hiperf_use_syspara = true
34  bundle_framework_enable = false
35  ability_base_enable = false
36  if (defined(global_parts_info) &&
37      defined(global_parts_info.bundlemanager_bundle_framework)) {
38    bundle_framework_enable = true
39  }
40  if (defined(global_parts_info) &&
41      defined(global_parts_info.ability_ability_base)) {
42    ability_base_enable = true
43  }
44}
45
46code_check_flag = []
47
48code_analyze_flag = [
49  "--analyze",
50  "-Xanalyzer",
51  "-analyzer-checker=cplusplus",
52  "-Xanalyzer",
53  "-analyzer-checker=core",
54  "-Xanalyzer",
55  "-analyzer-checker=security",
56  "-Xanalyzer",
57  "-analyzer-checker=unix",
58]
59
60if (is_double_framework && target_cpu == "arm64") {
61  # format specifies type 'long' but the argument has type
62  # 'std::__1::chrono::duration<long long, std::__1::ratio<1, 1000> >::rep' (aka 'long long')
63  # [-Werror,-Wformat]
64  code_check_flag += [ "-Wno-format" ]
65}
66