James Kuszmaul | 203bfc2 | 2023-01-13 22:37:06 -0800 | [diff] [blame^] | 1 | diff --git a/absl/copts/GENERATED_AbseilCopts.cmake b/absl/copts/GENERATED_AbseilCopts.cmake |
| 2 | index 04e7b444..5d164438 100644 |
| 3 | --- a/absl/copts/GENERATED_AbseilCopts.cmake |
| 4 | +++ b/absl/copts/GENERATED_AbseilCopts.cmake |
| 5 | @@ -49,6 +49,12 @@ list(APPEND ABSL_GCC_FLAGS |
| 6 | "-Wundef" |
| 7 | "-Wunused-local-typedefs" |
| 8 | "-Wunused-result" |
| 9 | + "-Wno-format-nonliteral" |
| 10 | + "-Wno-tautological-type-limit-compare" |
| 11 | + "-Wno-unused-parameter" |
| 12 | + "-Wno-sign-conversion" |
| 13 | + "-Wno-shorten-64-to-32" |
| 14 | + "-Wno-shadow" |
| 15 | "-Wvarargs" |
| 16 | "-Wvla" |
| 17 | "-Wwrite-strings" |
| 18 | @@ -66,6 +72,12 @@ list(APPEND ABSL_GCC_TEST_FLAGS |
| 19 | "-Wundef" |
| 20 | "-Wunused-local-typedefs" |
| 21 | "-Wunused-result" |
| 22 | + "-Wno-format-nonliteral" |
| 23 | + "-Wno-tautological-type-limit-compare" |
| 24 | + "-Wno-unused-parameter" |
| 25 | + "-Wno-sign-conversion" |
| 26 | + "-Wno-shorten-64-to-32" |
| 27 | + "-Wno-shadow" |
| 28 | "-Wvarargs" |
| 29 | "-Wvla" |
| 30 | "-Wwrite-strings" |
| 31 | @@ -95,8 +107,8 @@ list(APPEND ABSL_LLVM_FLAGS |
| 32 | "-Woverlength-strings" |
| 33 | "-Wpointer-arith" |
| 34 | "-Wself-assign" |
| 35 | - "-Wshadow-all" |
| 36 | "-Wshorten-64-to-32" |
| 37 | + "-Wno-shadow" |
| 38 | "-Wsign-conversion" |
| 39 | "-Wstring-conversion" |
| 40 | "-Wtautological-overlap-compare" |
| 41 | @@ -114,6 +126,11 @@ list(APPEND ABSL_LLVM_FLAGS |
| 42 | "-Wno-implicit-int-float-conversion" |
| 43 | "-Wno-unknown-warning-option" |
| 44 | "-DNOMINMAX" |
| 45 | + "-Wno-format-nonliteral" |
| 46 | + "-Wno-unused-parameter" |
| 47 | + "-Wno-tautological-type-limit-compare" |
| 48 | + "-Wno-sign-conversion" |
| 49 | + "-Wno-shorten-64-to-32" |
| 50 | ) |
| 51 | |
| 52 | list(APPEND ABSL_LLVM_TEST_FLAGS |
| 53 | @@ -133,7 +150,7 @@ list(APPEND ABSL_LLVM_TEST_FLAGS |
| 54 | "-Woverlength-strings" |
| 55 | "-Wpointer-arith" |
| 56 | "-Wself-assign" |
| 57 | - "-Wshadow-all" |
| 58 | + "-Wno-shadow" |
| 59 | "-Wstring-conversion" |
| 60 | "-Wtautological-overlap-compare" |
| 61 | "-Wtautological-unsigned-zero-compare" |
| 62 | @@ -150,6 +167,11 @@ list(APPEND ABSL_LLVM_TEST_FLAGS |
| 63 | "-Wno-implicit-int-float-conversion" |
| 64 | "-Wno-unknown-warning-option" |
| 65 | "-DNOMINMAX" |
| 66 | + "-Wno-format-nonliteral" |
| 67 | + "-Wno-unused-parameter" |
| 68 | + "-Wno-tautological-type-limit-compare" |
| 69 | + "-Wno-sign-conversion" |
| 70 | + "-Wno-shorten-64-to-32" |
| 71 | "-Wno-deprecated-declarations" |
| 72 | "-Wno-implicit-int-conversion" |
| 73 | "-Wno-missing-prototypes" |
| 74 | diff --git a/absl/copts/GENERATED_copts.bzl b/absl/copts/GENERATED_copts.bzl |
| 75 | index 84f4bffc..f15266dd 100644 |
| 76 | --- a/absl/copts/GENERATED_copts.bzl |
| 77 | +++ b/absl/copts/GENERATED_copts.bzl |
| 78 | @@ -50,6 +50,12 @@ ABSL_GCC_FLAGS = [ |
| 79 | "-Wundef", |
| 80 | "-Wunused-local-typedefs", |
| 81 | "-Wunused-result", |
| 82 | + "-Wno-format-nonliteral", |
| 83 | + "-Wno-tautological-type-limit-compare", |
| 84 | + "-Wno-unused-parameter", |
| 85 | + "-Wno-sign-conversion", |
| 86 | + "-Wno-shorten-64-to-32", |
| 87 | + "-Wno-shadow", |
| 88 | "-Wvarargs", |
| 89 | "-Wvla", |
| 90 | "-Wwrite-strings", |
| 91 | @@ -67,6 +73,12 @@ ABSL_GCC_TEST_FLAGS = [ |
| 92 | "-Wundef", |
| 93 | "-Wunused-local-typedefs", |
| 94 | "-Wunused-result", |
| 95 | + "-Wno-format-nonliteral", |
| 96 | + "-Wno-tautological-type-limit-compare", |
| 97 | + "-Wno-unused-parameter", |
| 98 | + "-Wno-sign-conversion", |
| 99 | + "-Wno-shorten-64-to-32", |
| 100 | + "-Wno-shadow", |
| 101 | "-Wvarargs", |
| 102 | "-Wvla", |
| 103 | "-Wwrite-strings", |
| 104 | @@ -96,8 +108,8 @@ ABSL_LLVM_FLAGS = [ |
| 105 | "-Woverlength-strings", |
| 106 | "-Wpointer-arith", |
| 107 | "-Wself-assign", |
| 108 | - "-Wshadow-all", |
| 109 | "-Wshorten-64-to-32", |
| 110 | + "-Wno-shadow", |
| 111 | "-Wsign-conversion", |
| 112 | "-Wstring-conversion", |
| 113 | "-Wtautological-overlap-compare", |
| 114 | @@ -115,6 +127,11 @@ ABSL_LLVM_FLAGS = [ |
| 115 | "-Wno-implicit-int-float-conversion", |
| 116 | "-Wno-unknown-warning-option", |
| 117 | "-DNOMINMAX", |
| 118 | + "-Wno-format-nonliteral", |
| 119 | + "-Wno-unused-parameter", |
| 120 | + "-Wno-tautological-type-limit-compare", |
| 121 | + "-Wno-sign-conversion", |
| 122 | + "-Wno-shorten-64-to-32", |
| 123 | ] |
| 124 | |
| 125 | ABSL_LLVM_TEST_FLAGS = [ |
| 126 | @@ -134,7 +151,7 @@ ABSL_LLVM_TEST_FLAGS = [ |
| 127 | "-Woverlength-strings", |
| 128 | "-Wpointer-arith", |
| 129 | "-Wself-assign", |
| 130 | - "-Wshadow-all", |
| 131 | + "-Wno-shadow", |
| 132 | "-Wstring-conversion", |
| 133 | "-Wtautological-overlap-compare", |
| 134 | "-Wtautological-unsigned-zero-compare", |
| 135 | @@ -151,6 +168,11 @@ ABSL_LLVM_TEST_FLAGS = [ |
| 136 | "-Wno-implicit-int-float-conversion", |
| 137 | "-Wno-unknown-warning-option", |
| 138 | "-DNOMINMAX", |
| 139 | + "-Wno-format-nonliteral", |
| 140 | + "-Wno-unused-parameter", |
| 141 | + "-Wno-tautological-type-limit-compare", |
| 142 | + "-Wno-sign-conversion", |
| 143 | + "-Wno-shorten-64-to-32", |
| 144 | "-Wno-deprecated-declarations", |
| 145 | "-Wno-implicit-int-conversion", |
| 146 | "-Wno-missing-prototypes", |
| 147 | diff --git a/absl/copts/copts.py b/absl/copts/copts.py |
| 148 | index 06eeb67b..bfd49c1d 100644 |
| 149 | --- a/absl/copts/copts.py |
| 150 | +++ b/absl/copts/copts.py |
| 151 | @@ -23,6 +23,12 @@ ABSL_GCC_FLAGS = [ |
| 152 | "-Wundef", |
| 153 | "-Wunused-local-typedefs", |
| 154 | "-Wunused-result", |
| 155 | + "-Wno-format-nonliteral", |
| 156 | + "-Wno-tautological-type-limit-compare", |
| 157 | + "-Wno-unused-parameter", |
| 158 | + "-Wno-sign-conversion", |
| 159 | + "-Wno-shorten-64-to-32", |
| 160 | + "-Wno-shadow", |
| 161 | "-Wvarargs", |
| 162 | "-Wvla", # variable-length array |
| 163 | "-Wwrite-strings", |
| 164 | @@ -56,8 +62,8 @@ ABSL_LLVM_FLAGS = [ |
| 165 | "-Woverlength-strings", |
| 166 | "-Wpointer-arith", |
| 167 | "-Wself-assign", |
| 168 | - "-Wshadow-all", |
| 169 | "-Wshorten-64-to-32", |
| 170 | + "-Wno-shadow", |
| 171 | "-Wsign-conversion", |
| 172 | "-Wstring-conversion", |
| 173 | "-Wtautological-overlap-compare", |
| 174 | @@ -80,6 +86,11 @@ ABSL_LLVM_FLAGS = [ |
| 175 | "-Wno-unknown-warning-option", |
| 176 | # Don't define min and max macros (Build on Windows using clang) |
| 177 | "-DNOMINMAX", |
| 178 | + "-Wno-format-nonliteral", |
| 179 | + "-Wno-unused-parameter", |
| 180 | + "-Wno-tautological-type-limit-compare", |
| 181 | + "-Wno-sign-conversion", |
| 182 | + "-Wno-shorten-64-to-32", |
| 183 | ] |
| 184 | |
| 185 | ABSL_LLVM_TEST_ADDITIONAL_FLAGS = [ |
| 186 | diff --git a/absl/random/internal/BUILD.bazel b/absl/random/internal/BUILD.bazel |
| 187 | index 81ca669b..e839860e 100644 |
| 188 | --- a/absl/random/internal/BUILD.bazel |
| 189 | +++ b/absl/random/internal/BUILD.bazel |
| 190 | @@ -665,6 +665,7 @@ cc_test( |
| 191 | cc_library( |
| 192 | name = "nanobenchmark", |
| 193 | srcs = ["nanobenchmark.cc"], |
| 194 | + copts = ABSL_DEFAULT_COPTS, |
| 195 | linkopts = ABSL_DEFAULT_LINKOPTS, |
| 196 | textual_hdrs = ["nanobenchmark.h"], |
| 197 | deps = [ |
| 198 | diff --git a/absl/strings/BUILD.bazel b/absl/strings/BUILD.bazel |
| 199 | index ed330f26..5f1c44b6 100644 |
| 200 | --- a/absl/strings/BUILD.bazel |
| 201 | +++ b/absl/strings/BUILD.bazel |
| 202 | @@ -653,6 +653,7 @@ cc_test( |
| 203 | srcs = [ |
| 204 | "internal/cordz_info_statistics_test.cc", |
| 205 | ], |
| 206 | + copts = ABSL_DEFAULT_COPTS, |
| 207 | deps = [ |
| 208 | ":cord", |
| 209 | ":cord_internal", |
| 210 | diff --git a/absl/time/internal/cctz/BUILD.bazel b/absl/time/internal/cctz/BUILD.bazel |
| 211 | index edeabd81..49674f5f 100644 |
| 212 | --- a/absl/time/internal/cctz/BUILD.bazel |
| 213 | +++ b/absl/time/internal/cctz/BUILD.bazel |
| 214 | @@ -16,6 +16,13 @@ package(features = ["-parse_headers"]) |
| 215 | |
| 216 | licenses(["notice"]) |
| 217 | |
| 218 | +load( |
| 219 | + "//absl:copts/configure_copts.bzl", |
| 220 | + "ABSL_DEFAULT_COPTS", |
| 221 | + "ABSL_DEFAULT_LINKOPTS", |
| 222 | + "ABSL_TEST_COPTS", |
| 223 | +) |
| 224 | + |
| 225 | ### libraries |
| 226 | |
| 227 | cc_library( |
| 228 | @@ -24,6 +31,8 @@ cc_library( |
| 229 | hdrs = [ |
| 230 | "include/cctz/civil_time.h", |
| 231 | ], |
| 232 | + copts = ABSL_DEFAULT_COPTS, |
| 233 | + linkopts = ABSL_DEFAULT_LINKOPTS, |
| 234 | textual_hdrs = ["include/cctz/civil_time_detail.h"], |
| 235 | visibility = ["//visibility:public"], |
| 236 | deps = ["//absl/base:config"], |
| 237 | @@ -53,6 +62,8 @@ cc_library( |
| 238 | "include/cctz/time_zone.h", |
| 239 | "include/cctz/zone_info_source.h", |
| 240 | ], |
| 241 | + copts = ABSL_DEFAULT_COPTS, |
| 242 | + linkopts = ABSL_DEFAULT_LINKOPTS, |
| 243 | # OS X and iOS no longer use `linkopts = ["-framework CoreFoundation"]` |
| 244 | # as (1) bazel adds it automatically, and (2) it caused problems when |
| 245 | # cross-compiling for Android. |