summaryrefslogtreecommitdiff
path: root/absl/copts
diff options
context:
space:
mode:
Diffstat (limited to 'absl/copts')
-rw-r--r--absl/copts/AbseilConfigureCopts.cmake8
-rw-r--r--absl/copts/GENERATED_AbseilCopts.cmake22
-rw-r--r--absl/copts/GENERATED_copts.bzl22
-rw-r--r--absl/copts/configure_copts.bzl13
-rw-r--r--absl/copts/copts.py17
5 files changed, 1 insertions, 81 deletions
diff --git a/absl/copts/AbseilConfigureCopts.cmake b/absl/copts/AbseilConfigureCopts.cmake
index 4ece4c6f..b430873c 100644
--- a/absl/copts/AbseilConfigureCopts.cmake
+++ b/absl/copts/AbseilConfigureCopts.cmake
@@ -8,7 +8,6 @@ set(ABSL_DEFAULT_LINKOPTS "")
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
set(ABSL_DEFAULT_COPTS "${ABSL_GCC_FLAGS}")
set(ABSL_TEST_COPTS "${ABSL_GCC_FLAGS};${ABSL_GCC_TEST_FLAGS}")
- set(ABSL_EXCEPTIONS_FLAG "${ABSL_GCC_EXCEPTIONS_FLAGS}")
set(ABSL_RANDOM_RANDEN_COPTS "${ABSL_RANDOM_HWAES_X64_FLAGS}")
elseif("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
# MATCHES so we get both Clang and AppleClang
@@ -16,13 +15,11 @@ elseif("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
# clang-cl is half MSVC, half LLVM
set(ABSL_DEFAULT_COPTS "${ABSL_CLANG_CL_FLAGS}")
set(ABSL_TEST_COPTS "${ABSL_CLANG_CL_FLAGS};${ABSL_CLANG_CL_TEST_FLAGS}")
- set(ABSL_EXCEPTIONS_FLAG "${ABSL_CLANG_CL_EXCEPTIONS_FLAGS}")
set(ABSL_DEFAULT_LINKOPTS "${ABSL_MSVC_LINKOPTS}")
set(ABSL_RANDOM_RANDEN_COPTS "${ABSL_RANDOM_HWAES_MSVC_X64_FLAGS}")
else()
set(ABSL_DEFAULT_COPTS "${ABSL_LLVM_FLAGS}")
set(ABSL_TEST_COPTS "${ABSL_LLVM_FLAGS};${ABSL_LLVM_TEST_FLAGS}")
- set(ABSL_EXCEPTIONS_FLAG "${ABSL_LLVM_EXCEPTIONS_FLAGS}")
set(ABSL_RANDOM_RANDEN_COPTS "${ABSL_RANDOM_HWAES_X64_FLAGS}")
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
# AppleClang doesn't have lsan
@@ -36,20 +33,15 @@ elseif("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
set(ABSL_DEFAULT_COPTS "${ABSL_MSVC_FLAGS}")
set(ABSL_TEST_COPTS "${ABSL_MSVC_FLAGS};${ABSL_MSVC_TEST_FLAGS}")
- set(ABSL_EXCEPTIONS_FLAG "${ABSL_MSVC_EXCEPTIONS_FLAGS}")
set(ABSL_DEFAULT_LINKOPTS "${ABSL_MSVC_LINKOPTS}")
set(ABSL_RANDOM_RANDEN_COPTS "${ABSL_RANDOM_HWAES_MSVC_X64_FLAGS}")
else()
message(WARNING "Unknown compiler: ${CMAKE_CXX_COMPILER}. Building with no default flags")
set(ABSL_DEFAULT_COPTS "")
set(ABSL_TEST_COPTS "")
- set(ABSL_EXCEPTIONS_FLAG "")
set(ABSL_RANDOM_RANDEN_COPTS "")
endif()
-# This flag is used internally for Bazel builds and is kept here for consistency
-set(ABSL_EXCEPTIONS_FLAG_LINKOPTS "")
-
if("${CMAKE_CXX_STANDARD}" EQUAL 98)
message(FATAL_ERROR "Abseil requires at least C++11")
elseif(NOT "${CMAKE_CXX_STANDARD}")
diff --git a/absl/copts/GENERATED_AbseilCopts.cmake b/absl/copts/GENERATED_AbseilCopts.cmake
index 57394c53..39b79c53 100644
--- a/absl/copts/GENERATED_AbseilCopts.cmake
+++ b/absl/copts/GENERATED_AbseilCopts.cmake
@@ -3,12 +3,6 @@
# (1) Edit absl/copts/copts.py.
# (2) Run `python <path_to_absl>/copts/generate_copts.py`.
-list(APPEND ABSL_CLANG_CL_EXCEPTIONS_FLAGS
- "/U_HAS_EXCEPTIONS"
- "/D_HAS_EXCEPTIONS=1"
- "/EHsc"
-)
-
list(APPEND ABSL_CLANG_CL_FLAGS
"/W3"
"-Wno-c++98-compat-pedantic"
@@ -80,10 +74,6 @@ list(APPEND ABSL_CLANG_CL_TEST_FLAGS
"-Wno-gnu-zero-variadic-macro-arguments"
)
-list(APPEND ABSL_GCC_EXCEPTIONS_FLAGS
- "-fexceptions"
-)
-
list(APPEND ABSL_GCC_FLAGS
"-Wall"
"-Wextra"
@@ -111,10 +101,6 @@ list(APPEND ABSL_GCC_TEST_FLAGS
"-Wno-unused-private-field"
)
-list(APPEND ABSL_LLVM_EXCEPTIONS_FLAGS
- "-fexceptions"
-)
-
list(APPEND ABSL_LLVM_FLAGS
"-Wall"
"-Wextra"
@@ -183,12 +169,6 @@ list(APPEND ABSL_LLVM_TEST_FLAGS
"-Wno-gnu-zero-variadic-macro-arguments"
)
-list(APPEND ABSL_MSVC_EXCEPTIONS_FLAGS
- "/U_HAS_EXCEPTIONS"
- "/D_HAS_EXCEPTIONS=1"
- "/EHsc"
-)
-
list(APPEND ABSL_MSVC_FLAGS
"/W3"
"/DNOMINMAX"
@@ -227,8 +207,6 @@ list(APPEND ABSL_RANDOM_HWAES_ARM64_FLAGS
)
list(APPEND ABSL_RANDOM_HWAES_MSVC_X64_FLAGS
- "/O2"
- "/Ob2"
)
list(APPEND ABSL_RANDOM_HWAES_X64_FLAGS
diff --git a/absl/copts/GENERATED_copts.bzl b/absl/copts/GENERATED_copts.bzl
index 18dbb681..7d645cc3 100644
--- a/absl/copts/GENERATED_copts.bzl
+++ b/absl/copts/GENERATED_copts.bzl
@@ -4,12 +4,6 @@
(2) Run `python <path_to_absl>/copts/generate_copts.py`.
"""
-ABSL_CLANG_CL_EXCEPTIONS_FLAGS = [
- "/U_HAS_EXCEPTIONS",
- "/D_HAS_EXCEPTIONS=1",
- "/EHsc",
-]
-
ABSL_CLANG_CL_FLAGS = [
"/W3",
"-Wno-c++98-compat-pedantic",
@@ -81,10 +75,6 @@ ABSL_CLANG_CL_TEST_FLAGS = [
"-Wno-gnu-zero-variadic-macro-arguments",
]
-ABSL_GCC_EXCEPTIONS_FLAGS = [
- "-fexceptions",
-]
-
ABSL_GCC_FLAGS = [
"-Wall",
"-Wextra",
@@ -112,10 +102,6 @@ ABSL_GCC_TEST_FLAGS = [
"-Wno-unused-private-field",
]
-ABSL_LLVM_EXCEPTIONS_FLAGS = [
- "-fexceptions",
-]
-
ABSL_LLVM_FLAGS = [
"-Wall",
"-Wextra",
@@ -184,12 +170,6 @@ ABSL_LLVM_TEST_FLAGS = [
"-Wno-gnu-zero-variadic-macro-arguments",
]
-ABSL_MSVC_EXCEPTIONS_FLAGS = [
- "/U_HAS_EXCEPTIONS",
- "/D_HAS_EXCEPTIONS=1",
- "/EHsc",
-]
-
ABSL_MSVC_FLAGS = [
"/W3",
"/DNOMINMAX",
@@ -228,8 +208,6 @@ ABSL_RANDOM_HWAES_ARM64_FLAGS = [
]
ABSL_RANDOM_HWAES_MSVC_X64_FLAGS = [
- "/O2",
- "/Ob2",
]
ABSL_RANDOM_HWAES_X64_FLAGS = [
diff --git a/absl/copts/configure_copts.bzl b/absl/copts/configure_copts.bzl
index 8c4efe77..2829e4ec 100644
--- a/absl/copts/configure_copts.bzl
+++ b/absl/copts/configure_copts.bzl
@@ -6,13 +6,10 @@ change Abseil copts, edit absl/copts/copts.py
load(
"//absl:copts/GENERATED_copts.bzl",
- "ABSL_GCC_EXCEPTIONS_FLAGS",
"ABSL_GCC_FLAGS",
"ABSL_GCC_TEST_FLAGS",
- "ABSL_LLVM_EXCEPTIONS_FLAGS",
"ABSL_LLVM_FLAGS",
"ABSL_LLVM_TEST_FLAGS",
- "ABSL_MSVC_EXCEPTIONS_FLAGS",
"ABSL_MSVC_FLAGS",
"ABSL_MSVC_LINKOPTS",
"ABSL_MSVC_TEST_FLAGS",
@@ -36,16 +33,6 @@ ABSL_TEST_COPTS = ABSL_DEFAULT_COPTS + select({
"//conditions:default": ABSL_GCC_TEST_FLAGS,
})
-ABSL_EXCEPTIONS_FLAG = select({
- "//absl:windows": ABSL_MSVC_EXCEPTIONS_FLAGS,
- "//absl:llvm_compiler": ABSL_LLVM_EXCEPTIONS_FLAGS,
- "//conditions:default": ABSL_GCC_EXCEPTIONS_FLAGS,
-})
-
-ABSL_EXCEPTIONS_FLAG_LINKOPTS = select({
- "//conditions:default": [],
-})
-
ABSL_DEFAULT_LINKOPTS = select({
"//absl:windows": ABSL_MSVC_LINKOPTS,
"//conditions:default": [],
diff --git a/absl/copts/copts.py b/absl/copts/copts.py
index 0db6e069..a5425415 100644
--- a/absl/copts/copts.py
+++ b/absl/copts/copts.py
@@ -109,12 +109,6 @@ LLVM_TEST_DISABLE_WARNINGS_FLAGS = [
"-Wno-gnu-zero-variadic-macro-arguments",
]
-MSVC_STYLE_EXCEPTIONS_FLAGS = [
- "/U_HAS_EXCEPTIONS",
- "/D_HAS_EXCEPTIONS=1",
- "/EHsc"
-]
-
MSVC_DEFINES = [
"/DNOMINMAX", # Don't define min and max macros (windows.h)
# Don't bloat namespace with incompatible winsock versions.
@@ -157,18 +151,14 @@ COPT_VARS = {
"-Wno-unused-parameter",
"-Wno-unused-private-field",
],
- "ABSL_GCC_EXCEPTIONS_FLAGS": ["-fexceptions"],
"ABSL_LLVM_FLAGS":
LLVM_BIG_WARNING_FLAGS + LLVM_DISABLE_WARNINGS_FLAGS,
"ABSL_LLVM_TEST_FLAGS":
LLVM_TEST_DISABLE_WARNINGS_FLAGS,
- "ABSL_LLVM_EXCEPTIONS_FLAGS": ["-fexceptions"],
"ABSL_CLANG_CL_FLAGS":
(MSVC_BIG_WARNING_FLAGS + LLVM_DISABLE_WARNINGS_FLAGS + MSVC_DEFINES),
"ABSL_CLANG_CL_TEST_FLAGS":
LLVM_TEST_DISABLE_WARNINGS_FLAGS,
- "ABSL_CLANG_CL_EXCEPTIONS_FLAGS":
- MSVC_STYLE_EXCEPTIONS_FLAGS,
"ABSL_MSVC_FLAGS":
MSVC_BIG_WARNING_FLAGS + MSVC_DEFINES + [
# Increase the number of sections available in object files
@@ -193,8 +183,6 @@ COPT_VARS = {
"/wd4996", # use of deprecated symbol
"/DNOMINMAX", # disable the min() and max() macros from <windows.h>
],
- "ABSL_MSVC_EXCEPTIONS_FLAGS":
- MSVC_STYLE_EXCEPTIONS_FLAGS,
"ABSL_MSVC_LINKOPTS": [
# Object file doesn't export any previously undefined symbols
"-ignore:4221",
@@ -209,8 +197,5 @@ COPT_VARS = {
"-maes",
"-msse4.1",
],
- "ABSL_RANDOM_HWAES_MSVC_X64_FLAGS": [
- "/O2", # Maximize speed
- "/Ob2", # Aggressive inlining
- ],
+ "ABSL_RANDOM_HWAES_MSVC_X64_FLAGS": [],
}