1 """Abseil compiler options. 3 This is the source of truth for Abseil compiler options. To modify Abseil 6 (1) Edit the appropriate list in this file based on the platform the flag is 8 (2) Run `<path_to_absl>/copts/generate_copts.py`. 10 The generated copts are consumed by configure_copts.bzl and 11 AbseilConfigureCopts.cmake. 15 MSVC_BIG_WARNING_FLAGS = [
19 LLVM_BIG_WARNING_FLAGS = [
27 LLVM_DISABLE_WARNINGS_FLAGS = [
29 "-Wno-c++98-compat-pedantic",
32 "-Wno-covered-switch-default",
34 "-Wno-disabled-macro-expansion",
35 "-Wno-double-promotion",
40 "-Wno-extra-semi-stmt",
48 "-Wno-float-conversion",
50 "-Wno-format-nonliteral",
56 "-Wno-global-constructors",
57 "-Wno-exit-time-destructors",
59 "-Wno-nested-anon-types",
60 "-Wno-non-modular-include-in-module",
61 "-Wno-old-style-cast",
63 "-Wno-range-loop-analysis",
64 "-Wno-reserved-id-macro",
65 "-Wno-shorten-64-to-32",
67 "-Wno-thread-safety-negative",
68 "-Wno-unknown-warning-option",
69 "-Wno-unreachable-code",
74 "-Wno-zero-as-null-pointer-constant",
78 "-Wbitfield-enum-conversion",
80 "-Wconstant-conversion",
83 "-Wliteral-conversion",
84 "-Wnon-literal-null-conversion",
86 "-Wobjc-literal-conversion",
87 "-Wno-sign-conversion",
88 "-Wstring-conversion",
91 LLVM_TEST_DISABLE_WARNINGS_FLAGS = [
92 "-Wno-c99-extensions",
93 "-Wno-deprecated-declarations",
94 "-Wno-missing-noreturn",
95 "-Wno-missing-prototypes",
96 "-Wno-missing-variable-declarations",
97 "-Wno-null-conversion",
99 "-Wno-shift-sign-overflow",
101 "-Wno-unused-function",
102 "-Wno-unused-member-function",
103 "-Wno-unused-parameter",
104 "-Wno-unused-private-field",
105 "-Wno-unused-template",
106 "-Wno-used-but-marked-unused",
107 "-Wno-zero-as-null-pointer-constant",
109 "-Wno-gnu-include-next",
111 "-Wno-gnu-zero-variadic-macro-arguments",
114 MSVC_STYLE_EXCEPTIONS_FLAGS = [
116 "/D_HAS_EXCEPTIONS=1",
123 "/DWIN32_LEAN_AND_MEAN",
125 "/D_CRT_SECURE_NO_WARNINGS",
126 "/D_SCL_SECURE_NO_WARNINGS",
128 "/D_ENABLE_EXTENDED_ALIGNED_STORAGE",
137 "-Wmissing-declarations",
138 "-Woverlength-strings",
140 "-Wunused-local-typedefs",
148 "-Wno-missing-field-initializers",
153 "ABSL_GCC_TEST_FLAGS": [
154 "-Wno-conversion-null",
155 "-Wno-deprecated-declarations",
156 "-Wno-missing-declarations",
158 "-Wno-unused-function",
159 "-Wno-unused-parameter",
160 "-Wno-unused-private-field",
162 "ABSL_GCC_EXCEPTIONS_FLAGS": [
"-fexceptions"],
164 LLVM_BIG_WARNING_FLAGS + LLVM_DISABLE_WARNINGS_FLAGS,
165 "ABSL_LLVM_TEST_FLAGS":
166 LLVM_TEST_DISABLE_WARNINGS_FLAGS,
167 "ABSL_LLVM_EXCEPTIONS_FLAGS": [
"-fexceptions"],
168 "ABSL_CLANG_CL_FLAGS":
169 (MSVC_BIG_WARNING_FLAGS + LLVM_DISABLE_WARNINGS_FLAGS + MSVC_DEFINES),
170 "ABSL_CLANG_CL_TEST_FLAGS":
171 LLVM_TEST_DISABLE_WARNINGS_FLAGS,
172 "ABSL_CLANG_CL_EXCEPTIONS_FLAGS":
173 MSVC_STYLE_EXCEPTIONS_FLAGS,
175 MSVC_BIG_WARNING_FLAGS + MSVC_DEFINES + [
189 "ABSL_MSVC_TEST_FLAGS": [
196 "ABSL_MSVC_EXCEPTIONS_FLAGS":
197 MSVC_STYLE_EXCEPTIONS_FLAGS,
198 "ABSL_MSVC_LINKOPTS": [