• 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
14hiperf_path = "//developtools/hiperf"
15
16innerkits_path = "${hiperf_path}/interfaces/innerkits"
17
18kits_path = "${hiperf_path}/interfaces/kits"
19
20declare_args() {
21  hiperf_target_host = false
22  hiperf_target_static = false
23  hiperf_test_coverage = false
24  hiperf_test_fuzz = false
25  hiperf_sanitize = false
26  hiperf_check_time = false
27  hiperf_use_libunwind = true
28  hiperf_debug = true
29  hiperf_code_analyze = false
30  hiperf_use_syspara = true
31}
32
33code_check_flag = [
34  "-Wformat",
35  "-Wall",
36  "-Wextra",
37  "-Werror",
38  "-Wmissing-field-initializers",
39  "-Wuninitialized",
40  "-Wunused-parameter",
41  "-Wunused-variable",
42  "-Wnull-pointer-arithmetic",
43  "-Wunused-lambda-capture",
44  "-Wuser-defined-warnings",
45  "-Wenum-compare-switch",
46  "-Wunneeded-internal-declaration",
47  "-Wundefined-var-template",
48  "-Wnonportable-include-path",
49  "-Wformat-extra-args",
50  "-Wsign-compare",
51  "-Wreturn-stack-address",
52]
53
54code_analyze_flag = [
55  "--analyze",
56  "-Xanalyzer",
57  "-analyzer-checker=cplusplus",
58  "-Xanalyzer",
59  "-analyzer-checker=core",
60  "-Xanalyzer",
61  "-analyzer-checker=security",
62  "-Xanalyzer",
63  "-analyzer-checker=unix",
64]
65
66if (is_double_framework && target_cpu == "arm64") {
67  # format specifies type 'long' but the argument has type
68  # 'std::__1::chrono::duration<long long, std::__1::ratio<1, 1000> >::rep' (aka 'long long')
69  # [-Werror,-Wformat]
70  code_check_flag += [ "-Wno-format" ]
71}
72