From 2946ac0dea49c894215a998aebb19d2f1d942909 Mon Sep 17 00:00:00 2001 From: Pavel Samolysov Date: Wed, 15 Apr 2020 00:25:55 +0300 Subject: Use base_internal::AtomicHook instead of std::atomic (#661) * Use base_internal::AtomicHook instead of std::atomic std::atomic has a broken implementation on the Windows platform and it is not conform to the ABSL_CONST_INIT macro when clang-cl is used as a compiler: the macro is expanded to the [[clang::require_constant_initialization]] attribute and the attribute cannot be applied to the broken std::atomic. Therefore, std::atomic has been replaced with absl::base_internal::AtomicHook to fix the compilation error (thank Derek Mauro for the suggestion). Issue: #659 Signed-off-by: Pavel Samolysov * Update build files for pull request Co-authored-by: Derek Mauro --- absl/status/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) (limited to 'absl/status/CMakeLists.txt') diff --git a/absl/status/CMakeLists.txt b/absl/status/CMakeLists.txt index f05cee5e..c041d695 100644 --- a/absl/status/CMakeLists.txt +++ b/absl/status/CMakeLists.txt @@ -25,6 +25,7 @@ absl_cc_library( COPTS ${ABSL_DEFAULT_COPTS} DEPS + absl::atomic_hook absl::config absl::core_headers absl::raw_logging_internal -- cgit v1.2.3