[llvm-branch-commits] [llvm] cf033ed - [CMake] Fix setting result of libatomic check for MSVC
Luís Marques via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Mon Feb 17 07:31:23 PST 2020
Author: Luís Marques
Date: 2020-02-17T15:30:57Z
New Revision: cf033ed461001efd8160cdc54b58c71abd46c868
URL: https://github.com/llvm/llvm-project/commit/cf033ed461001efd8160cdc54b58c71abd46c868
DIFF: https://github.com/llvm/llvm-project/commit/cf033ed461001efd8160cdc54b58c71abd46c868.diff
LOG: [CMake] Fix setting result of libatomic check for MSVC
We were skipping the libatomic requirement check for MSVC, but not setting
the corresponding variable, HAVE_CXX_ATOMICS_WITHOUT_LIB. D69869 seems to
have to failed to build on ARM MSVC because of that, and was reverted. This
should probably fix the issue. The plan is to check the result of the build
bots and then submit a more thoroughly refactored version for review.
Added:
Modified:
llvm/cmake/modules/CheckAtomic.cmake
Removed:
################################################################################
diff --git a/llvm/cmake/modules/CheckAtomic.cmake b/llvm/cmake/modules/CheckAtomic.cmake
index 29f3bdd57f03..af925f5bf9ec 100644
--- a/llvm/cmake/modules/CheckAtomic.cmake
+++ b/llvm/cmake/modules/CheckAtomic.cmake
@@ -53,6 +53,8 @@ if (LLVM_COMPILER_IS_GCC_COMPATIBLE)
message(FATAL_ERROR "Host compiler appears to require libatomic, but cannot find it.")
endif()
endif()
+elseif(MSVC)
+ set(HAVE_CXX_ATOMICS_WITHOUT_LIB True)
endif()
# Check for 64 bit atomic operations.
More information about the llvm-branch-commits
mailing list