1 # Copyright 2021 the gRPC authors.
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
7 # http://www.apache.org/licenses/LICENSE-2.0
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
15 # This is a list of llvm flags to be used when being built with use_strict_warning=1
16 GRPC_LLVM_WARNING_FLAGS = [
17 # Enable all & extra waninrgs
20 # Consider warnings as errors
22 # Ignore unknown warning flags
23 "-Wno-unknown-warning-option",
24 # A list of flags coming from internal build system
26 "-Wctad-maybe-unsupported",
27 "-Wdeprecated-increment-bool",
28 "-Wfloat-overflow-conversion",
29 "-Wfloat-zero-conversion",
30 "-Wfor-loop-analysis",
32 "-Wgnu-redeclared-enum",
33 "-Winfinite-recursion",
34 "-Wliteral-conversion",
36 "-Woverloaded-virtual",
38 "-Wstring-conversion",
39 "-Wtautological-overlap-compare",
40 "-Wthread-safety-analysis",
41 "-Wthread-safety-beta",
42 "-Wunused-comparison",
44 # Exceptions but will be removed
45 "-Wno-deprecated-declarations",
46 "-Wno-unused-function",
49 GRPC_DEFAULT_COPTS = select({
50 "//:use_strict_warning": GRPC_LLVM_WARNING_FLAGS,
51 "//conditions:default": [],