summaryrefslogtreecommitdiff
path: root/absl
diff options
context:
space:
mode:
authorGravatar Mike Kruskal <mkruskal@google.com>2023-01-24 09:18:25 -0800
committerGravatar Copybara-Service <copybara-worker@google.com>2023-01-24 09:19:28 -0800
commit20f44782bf1bb87069c43ff3f330e2dc4951a609 (patch)
tree90272e24533af0de23e69d6729a7b2c4754ba902 /absl
parenta9bc6fdf382a8875504536f6f4d6a353b0e84dca (diff)
Include Abseil logging in windows dll, and add a test helper dll.
This was tested with https://github.com/protocolbuffers/protobuf/pull/11623 in Protobuf's windows shared library build. PiperOrigin-RevId: 504294227 Change-Id: I9657197e649a334585bffa2c7bc6340cd2354e84
Diffstat (limited to 'absl')
-rw-r--r--absl/CMakeLists.txt3
-rw-r--r--absl/log/internal/nullguard.cc6
-rw-r--r--absl/log/internal/nullguard.h8
3 files changed, 11 insertions, 6 deletions
diff --git a/absl/CMakeLists.txt b/absl/CMakeLists.txt
index 19a91c62..3a7c12fe 100644
--- a/absl/CMakeLists.txt
+++ b/absl/CMakeLists.txt
@@ -38,4 +38,7 @@ add_subdirectory(utility)
if (${ABSL_BUILD_DLL})
absl_make_dll()
+ if (${ABSL_BUILD_TEST_HELPERS})
+ absl_make_dll(TEST ON)
+ endif()
endif()
diff --git a/absl/log/internal/nullguard.cc b/absl/log/internal/nullguard.cc
index 7b785c55..4f2f9d40 100644
--- a/absl/log/internal/nullguard.cc
+++ b/absl/log/internal/nullguard.cc
@@ -23,11 +23,11 @@ namespace absl {
ABSL_NAMESPACE_BEGIN
namespace log_internal {
-ABSL_CONST_INIT const std::array<char, 7> kCharNull{
+ABSL_DLL ABSL_CONST_INIT const std::array<char, 7> kCharNull{
{'(', 'n', 'u', 'l', 'l', ')', '\0'}};
-ABSL_CONST_INIT const std::array<signed char, 7> kSignedCharNull{
+ABSL_DLL ABSL_CONST_INIT const std::array<signed char, 7> kSignedCharNull{
{'(', 'n', 'u', 'l', 'l', ')', '\0'}};
-ABSL_CONST_INIT const std::array<unsigned char, 7> kUnsignedCharNull{
+ABSL_DLL ABSL_CONST_INIT const std::array<unsigned char, 7> kUnsignedCharNull{
{'(', 'n', 'u', 'l', 'l', ')', '\0'}};
} // namespace log_internal
diff --git a/absl/log/internal/nullguard.h b/absl/log/internal/nullguard.h
index a0ed4ad7..926f61bb 100644
--- a/absl/log/internal/nullguard.h
+++ b/absl/log/internal/nullguard.h
@@ -34,9 +34,11 @@ namespace absl {
ABSL_NAMESPACE_BEGIN
namespace log_internal {
-ABSL_CONST_INIT extern const std::array<char, 7> kCharNull;
-ABSL_CONST_INIT extern const std::array<signed char, 7> kSignedCharNull;
-ABSL_CONST_INIT extern const std::array<unsigned char, 7> kUnsignedCharNull;
+ABSL_DLL ABSL_CONST_INIT extern const std::array<char, 7> kCharNull;
+ABSL_DLL ABSL_CONST_INIT extern const std::array<signed char, 7>
+ kSignedCharNull;
+ABSL_DLL ABSL_CONST_INIT extern const std::array<unsigned char, 7>
+ kUnsignedCharNull;
template <typename T>
struct NullGuard final {