• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright 2023 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
15import("//build_overrides/pigweed.gni")
16
17import("$dir_pw_third_party/re2/re2.gni")
18
19# Targets that include RE2 headers need to include this config.
20config("disabled_warnings") {
21  cflags = [
22    "-Wno-dtor-name",
23    "-Wno-gnu-anonymous-struct",
24    "-Wno-nested-anon-types",
25  ]
26}
27
28# This config should only be used to build the RE2 library itself.
29config("internal_disabled_warnings") {
30  cflags = [
31    "-Wno-c99-extensions",
32    "-Wno-cast-qual",
33    "-Wno-dtor-name",
34    "-Wno-gnu-anonymous-struct",
35    "-Wno-nested-anon-types",
36    "-Wno-shadow",
37    "-Wno-switch-enum",
38    "-Wno-unused-parameter",
39  ]
40}
41
42# Include path for RE2.
43#
44# This is needed as the library is used to build FuzzTest in a dedicated
45# toolchain, and `public_configs` do not propagate across toolchain boundaries
46# by default.
47config("public_include_path") {
48  include_dirs = [ dir_pw_third_party_re2 ]
49}
50