summaryrefslogtreecommitdiff
path: root/absl/base/config.h
diff options
context:
space:
mode:
authorGravatar Mike Kruskal <mkruskal@google.com>2023-01-25 07:23:42 -0800
committerGravatar Copybara-Service <copybara-worker@google.com>2023-01-25 07:24:31 -0800
commita69b0ae5cdba53a45617afc408618a3e1ac244de (patch)
treea39122fff96c5c43f6d4895fd5b38cb70783f6bb /absl/base/config.h
parentf1d1657631e4df28513536920521997623960f41 (diff)
Separate DLL export/import for test helpers dll, and fix typo.
The DLL export issue isn't a problem currently, since we don't explicitly export any symbols from the test dll. This will be an issue in the future though. Additionally, there was a typo in absl_internal_test_dll_contains that caused abseil_test_dll to be empty (and therefore not create a lib file). PiperOrigin-RevId: 504555797 Change-Id: Ic7b50bcbe704f7c8fd44028071abcf5d6babb2cf
Diffstat (limited to 'absl/base/config.h')
-rw-r--r--absl/base/config.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/absl/base/config.h b/absl/base/config.h
index 5cbc9855..c2a973af 100644
--- a/absl/base/config.h
+++ b/absl/base/config.h
@@ -759,6 +759,18 @@ static_assert(ABSL_INTERNAL_INLINE_NAMESPACE_STR[0] != 'h' ||
#define ABSL_DLL
#endif // defined(_MSC_VER)
+#if defined(_MSC_VER)
+#if defined(ABSL_BUILD_TEST_DLL)
+#define ABSL_TEST_DLL __declspec(dllexport)
+#elif defined(ABSL_CONSUME_TEST_DLL)
+#define ABSL_TEST_DLL __declspec(dllimport)
+#else
+#define ABSL_TEST_DLL
+#endif
+#else
+#define ABSL_TEST_DLL
+#endif // defined(_MSC_VER)
+
// ABSL_HAVE_MEMORY_SANITIZER
//
// MemorySanitizer (MSan) is a detector of uninitialized reads. It consists of