[CMake] Filter libc++abi and libunwind from runtimes build in MSVC
authorPetr Hosek <phosek@google.com>
Fri, 31 Jan 2020 22:56:26 +0000 (14:56 -0800)
committerPetr Hosek <phosek@google.com>
Wed, 5 Feb 2020 17:59:06 +0000 (09:59 -0800)
These don't build on MSVC at the moment, so filter these out altogether
from the list of runtimes and print a warning.

Differential Revision: https://reviews.llvm.org/D73812

llvm/runtimes/CMakeLists.txt

index 6d68b07..f6056b6 100644 (file)
@@ -27,6 +27,12 @@ if(LLVM_ENABLE_RUNTIMES STREQUAL "all" )
   set(LLVM_ENABLE_RUNTIMES ${LLVM_ALL_RUNTIMES})
 endif()
 foreach(proj ${LLVM_ENABLE_RUNTIMES})
+  # TODO: libunwind and libcxxabi don't currently build on Windows so filter them out.
+  if(MSVC AND ("${proj}" MATCHES "libunwind|libcxxabi"))
+    message(WARNING "Skipping ${proj} which is not supported in MSVC yet")
+    continue()
+  endif()
+
   set(proj_dir "${CMAKE_CURRENT_SOURCE_DIR}/../../${proj}")
   if(IS_DIRECTORY ${proj_dir} AND EXISTS ${proj_dir}/CMakeLists.txt)
     list(APPEND runtimes ${proj_dir})