• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright 2020 The Pigweed Authors
2#
3# Licensed under the Apache License, Version 2.0 (the "License"); you may not
4# use this file except in compliance with the License. You may obtain a copy of
5# the License at
6#
7#     https://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12# License for the specific language governing permissions and limitations under
13# the License.
14
15buildconfig = "//BUILDCONFIG.gn"
16import("//build_overrides/pigweed_environment.gni")
17
18# Generate a compilation database for all targets.
19export_compile_commands = [ ":*" ]
20
21default_args = {
22  # Default all upstream Pigweed toolchains to enable pw::span asserts.
23  pw_span_ENABLE_ASSERTS = true
24
25  # Don't allow a plain .options file extension for upstream pwpb code.
26  pw_protobuf_compiler_NO_GENERIC_OPTIONS_FILES = true
27
28  pw_build_PIP_CONSTRAINTS =
29      [ "//pw_env_setup/py/pw_env_setup/virtualenv_setup/constraint.list" ]
30
31  pw_build_PIP_REQUIREMENTS = [ "//pw_env_setup/py/pw_env_setup/virtualenv_setup/pigweed_upstream_requirements.txt" ]
32
33  pw_build_PYTHON_BUILD_VENV = "//pw_env_setup:upstream_pigweed_build_venv"
34
35  # TODO(b/292098416): This should stay false until a cross-platform constraint
36  # file workflow is implemented.
37  pw_build_PYTHON_PIP_INSTALL_REQUIRE_HASHES = false
38
39  pw_build_PYTHON_PIP_INSTALL_FIND_LINKS =
40      [ "${pw_env_setup_CIPD_MSRV_PYTHON}/pip_cache" ]
41
42  pw_toolchain_STATIC_ANALYSIS_SKIP_SOURCES_RES = [
43    # Exclude third party CHRE headers that were downloaded from static analysis.
44    "environment/packages/chre/.*",
45
46    # Exclude third-party headers from static analysis.
47    "third_party/.*",
48
49    # Exclude GoogleTest, which fails some clang-tidy checks.
50    ".*/googletest/src/.*",
51    ".*/googlemock/src/.*",
52
53    # Exclude Boringssl, which fails some clang-tidy checks.
54    ".*/boringssl/src/.*",
55
56    # Exclude mbedtls, which fails some clang-tidy checks.
57    ".*/mbedtls/library/.*",
58
59    "pw_bluetooth_sapphire/.*",
60    "../pw_bluetooth_sapphire/.*",
61  ]
62
63  pw_toolchain_STATIC_ANALYSIS_SKIP_INCLUDE_PATHS = [
64    # Exclude third party CHRE code from static analysis.
65    "../environment/packages/chre/.*",
66
67    # Code generated by third-party tool.
68    "pw_tls_client/generate_test_data",
69
70    # Exclude GoogleTest, which fails some clang-tidy checks.
71    ".*/googletest/include.*",
72    ".*/googlemock/include.*",
73
74    # Exclude Boringssl, which fails some clang-tidy checks.
75    ".*/boringssl/src/include.*",
76
77    # Exclude mbedtls, which fails some clang-tidy checks.
78    ".*/mbedtls/include.*",
79
80    "../pw_bluetooth_sapphire/.*",
81  ]
82}
83