From 3aa3377ef66e6388ed19fd7c862bf0dc3a3630e0 Mon Sep 17 00:00:00 2001 From: Derek Mauro Date: Fri, 12 May 2023 08:45:48 -0700 Subject: Fixed Windows DLL builds of test targets This is a heavily modified version of https://github.com/abseil/abseil-cpp/pull/1445, which adds some missing test libraries to the test DLL. Unlike #1445, this change moves several global variables out of headers that did not need to be in headers. For instance, cord_btree_exhaustive_validation was a global defined/declared in cord_internal, but only used in cord_rep_btree and its test. cordz_handle defined a queue in its header even though it wasn't needed, which also led to ODR problems. The Spinlock used in CordzHandle is replaced with a Mutex. This was originally a Mutex, but Chromium asked us to change it to a Spinlock to avoid a static initializer. After this change, the static initializer is no longer an issue. #1407 PiperOrigin-RevId: 531516991 Change-Id: I0e431a193698b20ba03fac6e414c26f153f330a7 --- CMake/AbseilDll.cmake | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'CMake/AbseilDll.cmake') diff --git a/CMake/AbseilDll.cmake b/CMake/AbseilDll.cmake index 32b51411..aa73ae51 100644 --- a/CMake/AbseilDll.cmake +++ b/CMake/AbseilDll.cmake @@ -589,6 +589,10 @@ set(ABSL_INTERNAL_TEST_DLL_FILES "hash/hash_testing.h" "log/scoped_mock_log.cc" "log/scoped_mock_log.h" + "random/internal/chi_square.cc" + "random/internal/chi_square.h" + "random/internal/distribution_test_util.cc" + "random/internal/distribution_test_util.h" "random/internal/mock_helpers.h" "random/internal/mock_overload_set.h" "random/mocking_bit_gen.h" -- cgit v1.2.3