summaryrefslogtreecommitdiff
path: root/absl/copts.bzl
diff options
context:
space:
mode:
Diffstat (limited to 'absl/copts.bzl')
-rw-r--r--absl/copts.bzl23
1 files changed, 19 insertions, 4 deletions
diff --git a/absl/copts.bzl b/absl/copts.bzl
index 20c9b619..49c4c9e0 100644
--- a/absl/copts.bzl
+++ b/absl/copts.bzl
@@ -3,6 +3,8 @@
Flags specified here must not impact ABI. Code compiled with and without these
opts will be linked together, and in some cases headers compiled with and
without these options will be part of the same program.
+
+DO NOT CHANGE THIS FILE WITHOUT CHANGING THE SAME FLAG IN absl/CMake/AbseilConfigureCopts.cmake!!
"""
GCC_FLAGS = [
"-Wall",
@@ -31,12 +33,10 @@ GCC_TEST_FLAGS = [
"-Wno-unused-private-field",
]
-
# Docs on single flags is preceded by a comment.
# Docs on groups of flags is preceded by ###.
LLVM_FLAGS = [
- # All warnings are treated as errors by implicit -Werror flag
"-Wall",
"-Wextra",
"-Weverything",
@@ -55,6 +55,10 @@ LLVM_FLAGS = [
"-Wno-packed",
"-Wno-padded",
###
+ # Google style does not use unsigned integers, though STL containers
+ # have unsigned types.
+ "-Wno-sign-compare",
+ ###
"-Wno-float-conversion",
"-Wno-float-equal",
"-Wno-format-nonliteral",
@@ -102,6 +106,7 @@ LLVM_TEST_FLAGS = [
"-Wno-c99-extensions",
"-Wno-missing-noreturn",
"-Wno-missing-prototypes",
+ "-Wno-missing-variable-declarations",
"-Wno-null-conversion",
"-Wno-shadow",
"-Wno-shift-sign-overflow",
@@ -113,19 +118,25 @@ LLVM_TEST_FLAGS = [
"-Wno-unused-template",
"-Wno-used-but-marked-unused",
"-Wno-zero-as-null-pointer-constant",
+ # gtest depends on this GNU extension being offered.
+ "-Wno-gnu-zero-variadic-macro-arguments",
]
MSVC_FLAGS = [
"/W3",
- "/WX",
"/wd4005", # macro-redefinition
"/wd4068", # unknown pragma
+ "/wd4180", # qualifier applied to function type has no meaning; ignored
"/wd4244", # conversion from 'type1' to 'type2', possible loss of data
"/wd4267", # conversion from 'size_t' to 'type', possible loss of data
"/wd4800", # forcing value to bool 'true' or 'false' (performance warning)
"/DNOMINMAX", # Don't define min and max macros (windows.h)
"/DWIN32_LEAN_AND_MEAN", # Don't bloat namespace with incompatible winsock versions.
- "/D_CRT_SECURE_NO_WARNINGS", # Don't warn about usage of insecure C functions
+ "/D_CRT_SECURE_NO_WARNINGS", # Don't warn about usage of insecure C functions.
+ "/D_SCL_SECURE_NO_WARNINGS", # Don't warm when the compiler encounters a function or
+ # variable that is marked as deprecated (same as /wd4996).
+ "/D_ENABLE_EXTENDED_ALIGNED_STORAGE", # Introduced in VS 2017 15.8,
+ # before the member type would non-conformingly have an alignment of only alignof(max_align_t).
]
MSVC_TEST_FLAGS = [
@@ -153,3 +164,7 @@ ABSL_EXCEPTIONS_FLAG = select({
"//absl:windows": ["/U_HAS_EXCEPTIONS", "/D_HAS_EXCEPTIONS=1", "/EHsc"],
"//conditions:default": ["-fexceptions"],
})
+
+ABSL_EXCEPTIONS_FLAG_LINKOPTS = select({
+ "//conditions:default": [],
+})