about summary refs log tree commit diff
path: root/absl/base/BUILD.bazel
diff options
context:
space:
mode:
authorAbseil Team <absl-team@google.com>2019-03-27T15·05-0700
committerGennadiy Civil <misterg@google.com>2019-03-27T16·14-0400
commit5b65c4af5107176555b23a638e5947686410ac1f (patch)
treee1472a42cd71edb7bac59f39d3e9d95f5f0a7b59 /absl/base/BUILD.bazel
parenteab2078b53c9e3d9d240135c09d27e3393acb50a (diff)
Export of internal Abseil changes.
--
f6c627ce4470a814adc377947b58346eef69a4c9 by Jon Cohen <cohenjon@google.com>:

Don't create install rules when Abseil is used as a subdirectory.

Fix #287

PiperOrigin-RevId: 240559825

--
a5d9b06fe736143068997988b654b5f66ec3266a by Matt Calabrese <calabrese@google.com>:

Make absl::nullopt an inline constexpr variable, as specified in the standard (with a workaround for pre-c++17 compilers).

PiperOrigin-RevId: 240552286

--
d7bee50cff745fbb8d1cdf56a200d9073d311c80 by Abseil Team <absl-team@google.com>:

Internal Change

PiperOrigin-RevId: 240425622

--
828dd49d392d83dbeecd9d3e9cb14551ab265905 by Jon Cohen <cohenjon@google.com>:

Add default link options to absl builds.

Currently all this does is add -ignore:4221 to Abseil msvc builds, but the structure is all in place to add more link options when necessary

Fix #277

Note: This CL changes tact for us in that it puts the default options in the helper function as opposed to the invocations of absl_cc_blah.  The original intent of keeping these out of the helper functions was to make generating the CMakeLists.txt files have a smaller diff, but looking now that is a problem for the future, and small compared to making maintenance and use of our CMake buildsystem easier
PiperOrigin-RevId: 240409463

--
4aa120e9dcf76d29e9ca0008d0f6d4d9fa8abe8c by Matt Kulukundis <kfm@google.com>:

Reduce flake rate for non-determistic test to < 1/10,000

PiperOrigin-RevId: 240370938

--
bc30e219531827bfbf90915b2067c7fb8160bb6d by Derek Mauro <dmauro@google.com>:

Add Bazel caching on Kokoro for new linux targets.

PiperOrigin-RevId: 240356556

--
c4e06d79a50d7bb211312b7845c4bd92c0761747 by Jon Cohen <cohenjon@google.com>:

include AbseilInstallDirs instead of GNUInstallDirs.  It worked before because global_CMakeLists.txt also included AbseilInstallDirs

PiperOrigin-RevId: 240206409

--
c254dc6cade8a263f3f97fb1417d92fe5235ff32 by Jon Cohen <cohenjon@google.com>:

Fix logic for when we create the variant_exception_safety_test in CMake.  Currently we are only running in on gcc > 4.9, when we want it run on every compiler except gcc <= 4.8

PiperOrigin-RevId: 240194174

--
01518006b351d3670ba1d349cfbcb7dd6f3a8b84 by CJ Johnson <johnsoncj@google.com>:

Removes old implementation warning comment now that InlinedVector has an implementation detail file

PiperOrigin-RevId: 240167265

--
eb05355ae8c7397752ab7a65afc9e0a99472ba9d by Jon Cohen <cohenjon@google.com>:

Remove the forward declaration of Span

PiperOrigin-RevId: 240156660

--
b7e75aa3933d6e79dd086821cf58d15e72f476f4 by Jon Cohen <cohenjon@google.com>:

Prepare CMake install rule for LTS releases:
  * Remove the warning against installing in system install locations
  * Insert versioning to keep different LTS installs from colliding.  Headers are installed in <prefix>/absl_$version/include, .a files in <prefix>/absl_$version/lib, and config files in <prefix>/absl_$version/lib/cmake

PiperOrigin-RevId: 240153986

--
de63488ab6236e041f08260794b0b634a2b8ed16 by CJ Johnson <johnsoncj@google.com>:

Reduce reader confusion by using std::addressof(...) even when the type is known to not overload operator&(...)

PiperOrigin-RevId: 240131902
GitOrigin-RevId: f6c627ce4470a814adc377947b58346eef69a4c9
Change-Id: I95dbbacaaf65aceeeca9e9bee5fd9ea456225f62
Diffstat (limited to 'absl/base/BUILD.bazel')
-rw-r--r--absl/base/BUILD.bazel50
1 files changed, 34 insertions, 16 deletions
diff --git a/absl/base/BUILD.bazel b/absl/base/BUILD.bazel
index 804f62a0bffa..8133a4627e1a 100644
--- a/absl/base/BUILD.bazel
+++ b/absl/base/BUILD.bazel
@@ -17,6 +17,7 @@
 load(
     "//absl:copts/configure_copts.bzl",
     "ABSL_DEFAULT_COPTS",
+    "ABSL_DEFAULT_LINKOPTS",
     "ABSL_TEST_COPTS",
     "ABSL_EXCEPTIONS_FLAG",
     "ABSL_EXCEPTIONS_FLAG_LINKOPTS",
@@ -40,6 +41,7 @@ cc_library(
         "internal/spinlock_wait.h",
     ],
     copts = ABSL_DEFAULT_COPTS,
+    linkopts = ABSL_DEFAULT_LINKOPTS,
     visibility = [
         "//absl/base:__pkg__",
     ],
@@ -53,6 +55,7 @@ cc_library(
         "policy_checks.h",
     ],
     copts = ABSL_DEFAULT_COPTS,
+    linkopts = ABSL_DEFAULT_LINKOPTS,
 )
 
 cc_library(
@@ -61,6 +64,7 @@ cc_library(
     hdrs = ["dynamic_annotations.h"],
     copts = ABSL_DEFAULT_COPTS,
     defines = ["__CLANG_SUPPORT_DYN_ANNOTATION__"],
+    linkopts = ABSL_DEFAULT_LINKOPTS,
 )
 
 cc_library(
@@ -74,6 +78,7 @@ cc_library(
         "thread_annotations.h",
     ],
     copts = ABSL_DEFAULT_COPTS,
+    linkopts = ABSL_DEFAULT_LINKOPTS,
     deps = [
         ":config",
     ],
@@ -92,7 +97,7 @@ cc_library(
     linkopts = select({
         "//absl:windows": [],
         "//conditions:default": ["-pthread"],
-    }),
+    }) + ABSL_DEFAULT_LINKOPTS,
     visibility = [
         "//absl:__subpackages__",
     ],
@@ -115,6 +120,7 @@ cc_library(
         "internal/scheduling_mode.h",
     ],
     copts = ABSL_DEFAULT_COPTS,
+    linkopts = ABSL_DEFAULT_LINKOPTS,
     visibility = [
         "//absl:__subpackages__",
     ],
@@ -149,7 +155,7 @@ cc_library(
     linkopts = select({
         "//absl:windows": [],
         "//conditions:default": ["-pthread"],
-    }),
+    }) + ABSL_DEFAULT_LINKOPTS,
     deps = [
         ":base_internal",
         ":config",
@@ -164,6 +170,7 @@ cc_test(
     size = "small",
     srcs = ["internal/atomic_hook_test.cc"],
     copts = ABSL_TEST_COPTS,
+    linkopts = ABSL_DEFAULT_LINKOPTS,
     deps = [
         ":base",
         ":core_headers",
@@ -178,6 +185,7 @@ cc_test(
         "bit_cast_test.cc",
     ],
     copts = ABSL_TEST_COPTS,
+    linkopts = ABSL_DEFAULT_LINKOPTS,
     deps = [
         ":base",
         ":core_headers",
@@ -190,7 +198,7 @@ cc_library(
     srcs = ["internal/throw_delegate.cc"],
     hdrs = ["internal/throw_delegate.h"],
     copts = ABSL_DEFAULT_COPTS + ABSL_EXCEPTIONS_FLAG,
-    linkopts = ABSL_EXCEPTIONS_FLAG_LINKOPTS,
+    linkopts = ABSL_EXCEPTIONS_FLAG_LINKOPTS + ABSL_DEFAULT_LINKOPTS,
     visibility = [
         "//absl:__subpackages__",
     ],
@@ -204,7 +212,7 @@ cc_test(
     name = "throw_delegate_test",
     srcs = ["throw_delegate_test.cc"],
     copts = ABSL_TEST_COPTS + ABSL_EXCEPTIONS_FLAG,
-    linkopts = ABSL_EXCEPTIONS_FLAG_LINKOPTS,
+    linkopts = ABSL_EXCEPTIONS_FLAG_LINKOPTS + ABSL_DEFAULT_LINKOPTS,
     deps = [
         ":throw_delegate",
         "@com_google_googletest//:gtest_main",
@@ -216,6 +224,7 @@ cc_library(
     testonly = 1,
     hdrs = ["internal/exception_testing.h"],
     copts = ABSL_TEST_COPTS,
+    linkopts = ABSL_DEFAULT_LINKOPTS,
     visibility = [
         "//absl:__subpackages__",
     ],
@@ -228,6 +237,7 @@ cc_library(
 cc_library(
     name = "pretty_function",
     hdrs = ["internal/pretty_function.h"],
+    linkopts = ABSL_DEFAULT_LINKOPTS,
     visibility = ["//absl:__subpackages__"],
 )
 
@@ -237,7 +247,7 @@ cc_library(
     srcs = ["internal/exception_safety_testing.cc"],
     hdrs = ["internal/exception_safety_testing.h"],
     copts = ABSL_TEST_COPTS + ABSL_EXCEPTIONS_FLAG,
-    linkopts = ABSL_EXCEPTIONS_FLAG_LINKOPTS,
+    linkopts = ABSL_EXCEPTIONS_FLAG_LINKOPTS + ABSL_DEFAULT_LINKOPTS,
     deps = [
         ":config",
         ":pretty_function",
@@ -253,7 +263,7 @@ cc_test(
     name = "exception_safety_testing_test",
     srcs = ["exception_safety_testing_test.cc"],
     copts = ABSL_TEST_COPTS + ABSL_EXCEPTIONS_FLAG,
-    linkopts = ABSL_EXCEPTIONS_FLAG_LINKOPTS,
+    linkopts = ABSL_EXCEPTIONS_FLAG_LINKOPTS + ABSL_DEFAULT_LINKOPTS,
     deps = [
         ":exception_safety_testing",
         "//absl/memory",
@@ -271,6 +281,7 @@ cc_test(
         "internal/inline_variable_testing.h",
     ],
     copts = ABSL_TEST_COPTS,
+    linkopts = ABSL_DEFAULT_LINKOPTS,
     deps = [
         ":base_internal",
         "@com_google_googletest//:gtest_main",
@@ -282,6 +293,7 @@ cc_test(
     size = "small",
     srcs = ["invoke_test.cc"],
     copts = ABSL_TEST_COPTS,
+    linkopts = ABSL_DEFAULT_LINKOPTS,
     deps = [
         ":base_internal",
         "//absl/memory",
@@ -297,6 +309,7 @@ cc_library(
     testonly = 1,
     srcs = ["spinlock_test_common.cc"],
     copts = ABSL_TEST_COPTS,
+    linkopts = ABSL_DEFAULT_LINKOPTS,
     deps = [
         ":base",
         ":core_headers",
@@ -312,7 +325,7 @@ cc_test(
     size = "medium",
     srcs = ["spinlock_test_common.cc"],
     copts = ABSL_TEST_COPTS,
-    tags = ["no_test_wasm"],
+    linkopts = ABSL_DEFAULT_LINKOPTS,
     deps = [
         ":base",
         ":core_headers",
@@ -327,6 +340,7 @@ cc_library(
     testonly = 1,
     srcs = ["internal/spinlock_benchmark.cc"],
     copts = ABSL_TEST_COPTS,
+    linkopts = ABSL_DEFAULT_LINKOPTS,
     visibility = [
         "//absl/base:__pkg__",
     ],
@@ -343,6 +357,7 @@ cc_binary(
     name = "spinlock_benchmark",
     testonly = 1,
     copts = ABSL_DEFAULT_COPTS,
+    linkopts = ABSL_DEFAULT_LINKOPTS,
     visibility = ["//visibility:private"],
     deps = [
         ":spinlock_benchmark_common",
@@ -356,6 +371,7 @@ cc_library(
         "internal/unaligned_access.h",
     ],
     copts = ABSL_DEFAULT_COPTS,
+    linkopts = ABSL_DEFAULT_LINKOPTS,
     deps = [
         ":config",
         ":core_headers",
@@ -378,9 +394,7 @@ cc_test(
     name = "config_test",
     srcs = ["config_test.cc"],
     copts = ABSL_TEST_COPTS,
-    tags = [
-        "no_test_wasm",
-    ],
+    linkopts = ABSL_DEFAULT_LINKOPTS,
     deps = [
         ":config",
         "//absl/synchronization:thread_pool",
@@ -392,9 +406,7 @@ cc_test(
     name = "call_once_test",
     srcs = ["call_once_test.cc"],
     copts = ABSL_TEST_COPTS,
-    tags = [
-        "no_test_wasm",
-    ],
+    linkopts = ABSL_DEFAULT_LINKOPTS,
     deps = [
         ":base",
         ":core_headers",
@@ -407,6 +419,7 @@ cc_test(
     name = "raw_logging_test",
     srcs = ["raw_logging_test.cc"],
     copts = ABSL_TEST_COPTS,
+    linkopts = ABSL_DEFAULT_LINKOPTS,
     deps = [
         ":base",
         "//absl/strings",
@@ -419,6 +432,7 @@ cc_test(
     size = "small",
     srcs = ["internal/sysinfo_test.cc"],
     copts = ABSL_TEST_COPTS,
+    linkopts = ABSL_DEFAULT_LINKOPTS,
     deps = [
         ":base",
         "//absl/synchronization",
@@ -431,6 +445,7 @@ cc_test(
     size = "small",
     srcs = ["internal/low_level_alloc_test.cc"],
     copts = ABSL_TEST_COPTS,
+    linkopts = ABSL_DEFAULT_LINKOPTS,
     tags = ["no_test_ios_x86_64"],
     deps = [":malloc_internal"],
 )
@@ -440,9 +455,7 @@ cc_test(
     size = "small",
     srcs = ["internal/thread_identity_test.cc"],
     copts = ABSL_TEST_COPTS,
-    tags = [
-        "no_test_wasm",
-    ],
+    linkopts = ABSL_DEFAULT_LINKOPTS,
     deps = [
         ":base",
         ":core_headers",
@@ -455,6 +468,7 @@ cc_test(
     name = "thread_identity_benchmark",
     srcs = ["internal/thread_identity_benchmark.cc"],
     copts = ABSL_TEST_COPTS,
+    linkopts = ABSL_DEFAULT_LINKOPTS,
     tags = ["benchmark"],
     visibility = ["//visibility:private"],
     deps = [
@@ -467,6 +481,7 @@ cc_test(
 cc_library(
     name = "bits",
     hdrs = ["internal/bits.h"],
+    linkopts = ABSL_DEFAULT_LINKOPTS,
     visibility = [
         "//absl:__subpackages__",
     ],
@@ -478,6 +493,7 @@ cc_test(
     size = "small",
     srcs = ["internal/bits_test.cc"],
     copts = ABSL_TEST_COPTS,
+    linkopts = ABSL_DEFAULT_LINKOPTS,
     deps = [
         ":bits",
         "@com_google_googletest//:gtest_main",
@@ -489,6 +505,7 @@ cc_library(
     testonly = 1,
     srcs = ["internal/scoped_set_env.cc"],
     hdrs = ["internal/scoped_set_env.h"],
+    linkopts = ABSL_DEFAULT_LINKOPTS,
     visibility = [
         "//absl:__subpackages__",
     ],
@@ -500,6 +517,7 @@ cc_test(
     size = "small",
     srcs = ["internal/scoped_set_env_test.cc"],
     copts = ABSL_TEST_COPTS,
+    linkopts = ABSL_DEFAULT_LINKOPTS,
     deps = [
         ":scoped_set_env",
         "@com_google_googletest//:gtest_main",