From a69b0ae5cdba53a45617afc408618a3e1ac244de Mon Sep 17 00:00:00 2001 From: Mike Kruskal Date: Wed, 25 Jan 2023 07:23:42 -0800 Subject: 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 --- absl/base/config.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'absl/base') 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 -- cgit v1.2.3