[PATCH] D73812: [CMake] Filter libc++abi and libunwind from runtimes build on Windows

Petr Hosek via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 31 15:03:43 PST 2020


phosek created this revision.
phosek added reviewers: beanz, smeenai.
Herald added subscribers: llvm-commits, mstorsjo, dexonsmith, ldionne, mehdi_amini, mgorny.
Herald added a reviewer: EricWF.
Herald added a project: LLVM.
phosek added a comment.

I'm not sure if there's a better way. I cannot remove these from `LLVM_ENABLE_RUNTIMES` since I still want to build these for other targets, but I don't want these for Windows because they break the build.


These don't build on Windows at the moment, so filter these out
altogether from the list of runtimes.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D73812

Files:
  llvm/runtimes/CMakeLists.txt


Index: llvm/runtimes/CMakeLists.txt
===================================================================
--- llvm/runtimes/CMakeLists.txt
+++ llvm/runtimes/CMakeLists.txt
@@ -27,6 +27,11 @@
   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((WIN32 AND NOT MINGW) AND ("${proj}" MATCHES "libunwind|libcxxabi"))
+    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})


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D73812.241828.patch
Type: text/x-patch
Size: 649 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200131/85e82cf9/attachment.bin>


More information about the llvm-commits mailing list