浏览代码

Issue a warning instead of fatal errors when checks for libatomic fail.

This should fix PR26631, PR26622 and has the nice property that the addition
of the CheckLibcxxAtomic.cmake module acts as an NFC on the platforms of the
reporters (at least for the time being).

As these bug reports explain, CMake fails the atomic check because the
include headers might not exist in the host environment. We could
potentially point to the headers provided by libcxx itself.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@260961 91177308-0d34-0410-b5e6-96231b3b80d8
Vasileios Kalintiris 9 年之前
父节点
当前提交
fea3b21ea9
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      cmake/Modules/CheckLibcxxAtomic.cmake

+ 2 - 2
cmake/Modules/CheckLibcxxAtomic.cmake

@@ -33,9 +33,9 @@ if(NOT LIBCXX_HAVE_CXX_ATOMICS_WITHOUT_LIB)
     list(APPEND CMAKE_REQUIRED_LIBRARIES "atomic")
     check_cxx_atomics(LIBCXX_HAVE_CXX_ATOMICS_WITH_LIB)
     if (NOT LIBCXX_HAVE_CXX_ATOMICS_WITH_LIB)
-      message(FATAL_ERROR "Host compiler must support std::atomic!")
+      message(WARNING "Host compiler must support std::atomic!")
     endif()
   else()
-    message(FATAL_ERROR "Host compiler appears to require libatomic, but cannot find it.")
+    message(WARNING "Host compiler appears to require libatomic, but cannot find it.")
   endif()
 endif()