| diff --git a/absl/copts/GENERATED_AbseilCopts.cmake b/absl/copts/GENERATED_AbseilCopts.cmake |
| index 04e7b444..81884a6d 100644 |
| --- a/absl/copts/GENERATED_AbseilCopts.cmake |
| +++ b/absl/copts/GENERATED_AbseilCopts.cmake |
| @@ -49,6 +49,13 @@ list(APPEND ABSL_GCC_FLAGS |
| "-Wundef" |
| "-Wunused-local-typedefs" |
| "-Wunused-result" |
| + "-Wno-format-nonliteral" |
| + "-Wno-tautological-type-limit-compare" |
| + "-Wno-unused-parameter" |
| + "-Wno-sign-conversion" |
| + "-Wno-shorten-64-to-32" |
| + "-Wno-shadow" |
| + "-Wno-stringop-overflow" |
| "-Wvarargs" |
| "-Wvla" |
| "-Wwrite-strings" |
| @@ -66,6 +73,13 @@ list(APPEND ABSL_GCC_TEST_FLAGS |
| "-Wundef" |
| "-Wunused-local-typedefs" |
| "-Wunused-result" |
| + "-Wno-format-nonliteral" |
| + "-Wno-tautological-type-limit-compare" |
| + "-Wno-unused-parameter" |
| + "-Wno-sign-conversion" |
| + "-Wno-shorten-64-to-32" |
| + "-Wno-shadow" |
| + "-Wno-stringop-overflow" |
| "-Wvarargs" |
| "-Wvla" |
| "-Wwrite-strings" |
| @@ -95,8 +109,8 @@ list(APPEND ABSL_LLVM_FLAGS |
| "-Woverlength-strings" |
| "-Wpointer-arith" |
| "-Wself-assign" |
| - "-Wshadow-all" |
| "-Wshorten-64-to-32" |
| + "-Wno-shadow" |
| "-Wsign-conversion" |
| "-Wstring-conversion" |
| "-Wtautological-overlap-compare" |
| @@ -114,6 +128,12 @@ list(APPEND ABSL_LLVM_FLAGS |
| "-Wno-implicit-int-float-conversion" |
| "-Wno-unknown-warning-option" |
| "-DNOMINMAX" |
| + "-Wno-format-nonliteral" |
| + "-Wno-unused-parameter" |
| + "-Wno-tautological-type-limit-compare" |
| + "-Wno-sign-conversion" |
| + "-Wno-shorten-64-to-32" |
| + "-Wno-stringop-overflow" |
| ) |
| |
| list(APPEND ABSL_LLVM_TEST_FLAGS |
| @@ -133,7 +153,7 @@ list(APPEND ABSL_LLVM_TEST_FLAGS |
| "-Woverlength-strings" |
| "-Wpointer-arith" |
| "-Wself-assign" |
| - "-Wshadow-all" |
| + "-Wno-shadow" |
| "-Wstring-conversion" |
| "-Wtautological-overlap-compare" |
| "-Wtautological-unsigned-zero-compare" |
| @@ -150,6 +170,12 @@ list(APPEND ABSL_LLVM_TEST_FLAGS |
| "-Wno-implicit-int-float-conversion" |
| "-Wno-unknown-warning-option" |
| "-DNOMINMAX" |
| + "-Wno-format-nonliteral" |
| + "-Wno-unused-parameter" |
| + "-Wno-tautological-type-limit-compare" |
| + "-Wno-sign-conversion" |
| + "-Wno-shorten-64-to-32" |
| + "-Wno-stringop-overflow" |
| "-Wno-deprecated-declarations" |
| "-Wno-implicit-int-conversion" |
| "-Wno-missing-prototypes" |
| diff --git a/absl/copts/GENERATED_copts.bzl b/absl/copts/GENERATED_copts.bzl |
| index 84f4bffc..21f487a1 100644 |
| --- a/absl/copts/GENERATED_copts.bzl |
| +++ b/absl/copts/GENERATED_copts.bzl |
| @@ -50,6 +50,13 @@ ABSL_GCC_FLAGS = [ |
| "-Wundef", |
| "-Wunused-local-typedefs", |
| "-Wunused-result", |
| + "-Wno-format-nonliteral", |
| + "-Wno-tautological-type-limit-compare", |
| + "-Wno-unused-parameter", |
| + "-Wno-sign-conversion", |
| + "-Wno-shorten-64-to-32", |
| + "-Wno-shadow", |
| + "-Wno-stringop-overflow", |
| "-Wvarargs", |
| "-Wvla", |
| "-Wwrite-strings", |
| @@ -67,6 +74,13 @@ ABSL_GCC_TEST_FLAGS = [ |
| "-Wundef", |
| "-Wunused-local-typedefs", |
| "-Wunused-result", |
| + "-Wno-format-nonliteral", |
| + "-Wno-tautological-type-limit-compare", |
| + "-Wno-unused-parameter", |
| + "-Wno-sign-conversion", |
| + "-Wno-shorten-64-to-32", |
| + "-Wno-shadow", |
| + "-Wno-stringop-overflow", |
| "-Wvarargs", |
| "-Wvla", |
| "-Wwrite-strings", |
| @@ -96,8 +110,8 @@ ABSL_LLVM_FLAGS = [ |
| "-Woverlength-strings", |
| "-Wpointer-arith", |
| "-Wself-assign", |
| - "-Wshadow-all", |
| "-Wshorten-64-to-32", |
| + "-Wno-shadow", |
| "-Wsign-conversion", |
| "-Wstring-conversion", |
| "-Wtautological-overlap-compare", |
| @@ -115,6 +129,12 @@ ABSL_LLVM_FLAGS = [ |
| "-Wno-implicit-int-float-conversion", |
| "-Wno-unknown-warning-option", |
| "-DNOMINMAX", |
| + "-Wno-format-nonliteral", |
| + "-Wno-unused-parameter", |
| + "-Wno-tautological-type-limit-compare", |
| + "-Wno-sign-conversion", |
| + "-Wno-shorten-64-to-32", |
| + "-Wno-stringop-overflow", |
| ] |
| |
| ABSL_LLVM_TEST_FLAGS = [ |
| @@ -134,7 +154,7 @@ ABSL_LLVM_TEST_FLAGS = [ |
| "-Woverlength-strings", |
| "-Wpointer-arith", |
| "-Wself-assign", |
| - "-Wshadow-all", |
| + "-Wno-shadow", |
| "-Wstring-conversion", |
| "-Wtautological-overlap-compare", |
| "-Wtautological-unsigned-zero-compare", |
| @@ -151,6 +171,12 @@ ABSL_LLVM_TEST_FLAGS = [ |
| "-Wno-implicit-int-float-conversion", |
| "-Wno-unknown-warning-option", |
| "-DNOMINMAX", |
| + "-Wno-format-nonliteral", |
| + "-Wno-unused-parameter", |
| + "-Wno-tautological-type-limit-compare", |
| + "-Wno-sign-conversion", |
| + "-Wno-shorten-64-to-32", |
| + "-Wno-stringop-overflow", |
| "-Wno-deprecated-declarations", |
| "-Wno-implicit-int-conversion", |
| "-Wno-missing-prototypes", |
| diff --git a/absl/copts/copts.py b/absl/copts/copts.py |
| index 06eeb67b..d2a3e74f 100644 |
| --- a/absl/copts/copts.py |
| +++ b/absl/copts/copts.py |
| @@ -23,6 +23,13 @@ ABSL_GCC_FLAGS = [ |
| "-Wundef", |
| "-Wunused-local-typedefs", |
| "-Wunused-result", |
| + "-Wno-format-nonliteral", |
| + "-Wno-tautological-type-limit-compare", |
| + "-Wno-unused-parameter", |
| + "-Wno-sign-conversion", |
| + "-Wno-shorten-64-to-32", |
| + "-Wno-shadow", |
| + "-Wno-stringop-overflow", |
| "-Wvarargs", |
| "-Wvla", # variable-length array |
| "-Wwrite-strings", |
| @@ -56,8 +63,8 @@ ABSL_LLVM_FLAGS = [ |
| "-Woverlength-strings", |
| "-Wpointer-arith", |
| "-Wself-assign", |
| - "-Wshadow-all", |
| "-Wshorten-64-to-32", |
| + "-Wno-shadow", |
| "-Wsign-conversion", |
| "-Wstring-conversion", |
| "-Wtautological-overlap-compare", |
| @@ -80,6 +87,12 @@ ABSL_LLVM_FLAGS = [ |
| "-Wno-unknown-warning-option", |
| # Don't define min and max macros (Build on Windows using clang) |
| "-DNOMINMAX", |
| + "-Wno-format-nonliteral", |
| + "-Wno-unused-parameter", |
| + "-Wno-tautological-type-limit-compare", |
| + "-Wno-sign-conversion", |
| + "-Wno-shorten-64-to-32", |
| + "-Wno-stringop-overflow", |
| ] |
| |
| ABSL_LLVM_TEST_ADDITIONAL_FLAGS = [ |
| diff --git a/absl/random/internal/BUILD.bazel b/absl/random/internal/BUILD.bazel |
| index 81ca669b..e839860e 100644 |
| --- a/absl/random/internal/BUILD.bazel |
| +++ b/absl/random/internal/BUILD.bazel |
| @@ -665,6 +665,7 @@ cc_test( |
| cc_library( |
| name = "nanobenchmark", |
| srcs = ["nanobenchmark.cc"], |
| + copts = ABSL_DEFAULT_COPTS, |
| linkopts = ABSL_DEFAULT_LINKOPTS, |
| textual_hdrs = ["nanobenchmark.h"], |
| deps = [ |
| diff --git a/absl/strings/BUILD.bazel b/absl/strings/BUILD.bazel |
| index ed330f26..5f1c44b6 100644 |
| --- a/absl/strings/BUILD.bazel |
| +++ b/absl/strings/BUILD.bazel |
| @@ -653,6 +653,7 @@ cc_test( |
| srcs = [ |
| "internal/cordz_info_statistics_test.cc", |
| ], |
| + copts = ABSL_DEFAULT_COPTS, |
| deps = [ |
| ":cord", |
| ":cord_internal", |
| diff --git a/absl/time/internal/cctz/BUILD.bazel b/absl/time/internal/cctz/BUILD.bazel |
| index edeabd81..49674f5f 100644 |
| --- a/absl/time/internal/cctz/BUILD.bazel |
| +++ b/absl/time/internal/cctz/BUILD.bazel |
| @@ -16,6 +16,13 @@ package(features = ["-parse_headers"]) |
| |
| licenses(["notice"]) |
| |
| +load( |
| + "//absl:copts/configure_copts.bzl", |
| + "ABSL_DEFAULT_COPTS", |
| + "ABSL_DEFAULT_LINKOPTS", |
| + "ABSL_TEST_COPTS", |
| +) |
| + |
| ### libraries |
| |
| cc_library( |
| @@ -24,6 +31,8 @@ cc_library( |
| hdrs = [ |
| "include/cctz/civil_time.h", |
| ], |
| + copts = ABSL_DEFAULT_COPTS, |
| + linkopts = ABSL_DEFAULT_LINKOPTS, |
| textual_hdrs = ["include/cctz/civil_time_detail.h"], |
| visibility = ["//visibility:public"], |
| deps = ["//absl/base:config"], |
| @@ -53,6 +62,8 @@ cc_library( |
| "include/cctz/time_zone.h", |
| "include/cctz/zone_info_source.h", |
| ], |
| + copts = ABSL_DEFAULT_COPTS, |
| + linkopts = ABSL_DEFAULT_LINKOPTS, |
| # OS X and iOS no longer use `linkopts = ["-framework CoreFoundation"]` |
| # as (1) bazel adds it automatically, and (2) it caused problems when |
| # cross-compiling for Android. |
| diff --git a/absl/copts/configure_copts.bzl b/absl/copts/configure_copts.bzl |
| index ca5f26da..0b10dc0b 100644 |
| --- a/absl/copts/configure_copts.bzl |
| +++ b/absl/copts/configure_copts.bzl |
| @@ -46,13 +46,8 @@ ABSL_DEFAULT_LINKOPTS = select({ |
| # environment to build an accelerated RandenHwAes library. |
| ABSL_RANDOM_RANDEN_COPTS = select({ |
| # APPLE |
| - ":cpu_darwin_x86_64": ABSL_RANDOM_HWAES_X64_FLAGS, |
| - ":cpu_darwin": ABSL_RANDOM_HWAES_X64_FLAGS, |
| - ":cpu_x64_windows_msvc": ABSL_RANDOM_HWAES_MSVC_X64_FLAGS, |
| - ":cpu_x64_windows": ABSL_RANDOM_HWAES_MSVC_X64_FLAGS, |
| - ":cpu_k8": ABSL_RANDOM_HWAES_X64_FLAGS, |
| - ":cpu_ppc": ["-mcrypto"], |
| - ":cpu_aarch64": ABSL_RANDOM_HWAES_ARM64_FLAGS, |
| + "@platforms//cpu:x86_64": ABSL_RANDOM_HWAES_X64_FLAGS, |
| + "@platforms//cpu:aarch64": ABSL_RANDOM_HWAES_ARM64_FLAGS, |
| |
| # Supported by default or unsupported. |
| "//conditions:default": [], |