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