summaryrefslogtreecommitdiff
path: root/absl/copts/GENERATED_copts.bzl
diff options
context:
space:
mode:
authorGravatar Derek Mauro <dmauro@google.com>2022-12-15 13:34:43 -0800
committerGravatar Copybara-Service <copybara-worker@google.com>2022-12-15 13:35:26 -0800
commite2416566660e1892274a56b34504b8b8c6c76101 (patch)
treeab8049fd0e7d3926caf8af274515999bff47f46a /absl/copts/GENERATED_copts.bzl
parent3fe1e96ea9da8cf27589dfa988e4fe2eb220fccf (diff)
Add the ability to turn on warnings that get disabled in tests
in GCC and LLVM build configs This was accomplished by adding GccStyleFilterAndCombine() in copts.py Previously, if we had a default warning of the form -Wwarning, adding -Wno-warning to the list of test warnings would just add conflicting flags. We now filter -Wwarning if -Wno-warning is added to the test warnings. PiperOrigin-RevId: 495683815 Change-Id: I5dfd8a30b0be09d6b48237f61d598230ab9027db
Diffstat (limited to 'absl/copts/GENERATED_copts.bzl')
-rw-r--r--absl/copts/GENERATED_copts.bzl77
1 files changed, 72 insertions, 5 deletions
diff --git a/absl/copts/GENERATED_copts.bzl b/absl/copts/GENERATED_copts.bzl
index 62aab656..bfae4b70 100644
--- a/absl/copts/GENERATED_copts.bzl
+++ b/absl/copts/GENERATED_copts.bzl
@@ -14,6 +14,12 @@ ABSL_CLANG_CL_FLAGS = [
]
ABSL_CLANG_CL_TEST_FLAGS = [
+ "/W3",
+ "/DNOMINMAX",
+ "/DWIN32_LEAN_AND_MEAN",
+ "/D_CRT_SECURE_NO_WARNINGS",
+ "/D_SCL_SECURE_NO_WARNINGS",
+ "/D_ENABLE_EXTENDED_ALIGNED_STORAGE",
"-Wno-deprecated-declarations",
"-Wno-implicit-int-conversion",
"-Wno-missing-prototypes",
@@ -51,6 +57,20 @@ ABSL_GCC_FLAGS = [
]
ABSL_GCC_TEST_FLAGS = [
+ "-Wall",
+ "-Wextra",
+ "-Wcast-qual",
+ "-Wconversion-null",
+ "-Wformat-security",
+ "-Woverlength-strings",
+ "-Wpointer-arith",
+ "-Wundef",
+ "-Wunused-local-typedefs",
+ "-Wunused-result",
+ "-Wvarargs",
+ "-Wvla",
+ "-Wwrite-strings",
+ "-DNOMINMAX",
"-Wno-deprecated-declarations",
"-Wno-missing-declarations",
"-Wno-sign-compare",
@@ -96,6 +116,39 @@ ABSL_LLVM_FLAGS = [
]
ABSL_LLVM_TEST_FLAGS = [
+ "-Wall",
+ "-Wextra",
+ "-Wcast-qual",
+ "-Wconversion",
+ "-Wfloat-overflow-conversion",
+ "-Wfloat-zero-conversion",
+ "-Wfor-loop-analysis",
+ "-Wformat-security",
+ "-Wgnu-redeclared-enum",
+ "-Winfinite-recursion",
+ "-Winvalid-constexpr",
+ "-Wliteral-conversion",
+ "-Wmissing-declarations",
+ "-Woverlength-strings",
+ "-Wpointer-arith",
+ "-Wself-assign",
+ "-Wshadow-all",
+ "-Wstring-conversion",
+ "-Wtautological-overlap-compare",
+ "-Wtautological-unsigned-zero-compare",
+ "-Wundef",
+ "-Wuninitialized",
+ "-Wunreachable-code",
+ "-Wunused-comparison",
+ "-Wunused-local-typedefs",
+ "-Wunused-result",
+ "-Wvla",
+ "-Wwrite-strings",
+ "-Wno-float-conversion",
+ "-Wno-implicit-float-conversion",
+ "-Wno-implicit-int-float-conversion",
+ "-Wno-unknown-warning-option",
+ "-DNOMINMAX",
"-Wno-deprecated-declarations",
"-Wno-implicit-int-conversion",
"-Wno-missing-prototypes",
@@ -116,11 +169,6 @@ ABSL_LLVM_TEST_FLAGS = [
ABSL_MSVC_FLAGS = [
"/W3",
- "/DNOMINMAX",
- "/DWIN32_LEAN_AND_MEAN",
- "/D_CRT_SECURE_NO_WARNINGS",
- "/D_SCL_SECURE_NO_WARNINGS",
- "/D_ENABLE_EXTENDED_ALIGNED_STORAGE",
"/bigobj",
"/wd4005",
"/wd4068",
@@ -129,6 +177,11 @@ ABSL_MSVC_FLAGS = [
"/wd4267",
"/wd4503",
"/wd4800",
+ "/DNOMINMAX",
+ "/DWIN32_LEAN_AND_MEAN",
+ "/D_CRT_SECURE_NO_WARNINGS",
+ "/D_SCL_SECURE_NO_WARNINGS",
+ "/D_ENABLE_EXTENDED_ALIGNED_STORAGE",
]
ABSL_MSVC_LINKOPTS = [
@@ -136,6 +189,20 @@ ABSL_MSVC_LINKOPTS = [
]
ABSL_MSVC_TEST_FLAGS = [
+ "/W3",
+ "/bigobj",
+ "/wd4005",
+ "/wd4068",
+ "/wd4180",
+ "/wd4244",
+ "/wd4267",
+ "/wd4503",
+ "/wd4800",
+ "/DNOMINMAX",
+ "/DWIN32_LEAN_AND_MEAN",
+ "/D_CRT_SECURE_NO_WARNINGS",
+ "/D_SCL_SECURE_NO_WARNINGS",
+ "/D_ENABLE_EXTENDED_ALIGNED_STORAGE",
"/wd4018",
"/wd4101",
"/wd4503",