vchuravy created this revision.
Herald added subscribers: cfe-commits, mstorsjo, mgorny.
Herald added a project: clang.
vchuravy added a reviewer: tstellar.
vchuravy added a comment.

Some additional context. We [Julia] is cross-compiling LLVM from Linux to 
mingw32
as part of an automatic buildsystem for our binary dependencies. The 
corresponding PR is https://github.com/JuliaPackaging/Yggdrasil/pull/417


Currently we exclude the libclang-cpp cmake files
on any non-unix platform, this excludes mingw32.

I suspect that the goal was to exclude MSVC only.
For the LLVM shlib we throw an error if someone tries
to build the shared library, whereas I stuck to the pattern
here that a misconfiguration causes an early return.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D73156

Files:
  clang/tools/CMakeLists.txt
  clang/tools/clang-shlib/CMakeLists.txt


Index: clang/tools/clang-shlib/CMakeLists.txt
===================================================================
--- clang/tools/clang-shlib/CMakeLists.txt
+++ clang/tools/clang-shlib/CMakeLists.txt
@@ -3,6 +3,11 @@
   return()
 endif()
 
+# Building libclang-cpp.so may not work on MSVC
+if (MSVC)
+  return()
+endif()
+
 get_property(clang_libs GLOBAL PROPERTY CLANG_STATIC_LIBS)
 
 foreach (lib ${clang_libs})
Index: clang/tools/CMakeLists.txt
===================================================================
--- clang/tools/CMakeLists.txt
+++ clang/tools/CMakeLists.txt
@@ -15,9 +15,7 @@
 
 add_clang_subdirectory(clang-rename)
 add_clang_subdirectory(clang-refactor)
-if(UNIX)
-  add_clang_subdirectory(clang-shlib)
-endif()
+add_clang_subdirectory(clang-shlib)
 
 if(CLANG_ENABLE_ARCMT)
   add_clang_subdirectory(arcmt-test)


Index: clang/tools/clang-shlib/CMakeLists.txt
===================================================================
--- clang/tools/clang-shlib/CMakeLists.txt
+++ clang/tools/clang-shlib/CMakeLists.txt
@@ -3,6 +3,11 @@
   return()
 endif()
 
+# Building libclang-cpp.so may not work on MSVC
+if (MSVC)
+  return()
+endif()
+
 get_property(clang_libs GLOBAL PROPERTY CLANG_STATIC_LIBS)
 
 foreach (lib ${clang_libs})
Index: clang/tools/CMakeLists.txt
===================================================================
--- clang/tools/CMakeLists.txt
+++ clang/tools/CMakeLists.txt
@@ -15,9 +15,7 @@
 
 add_clang_subdirectory(clang-rename)
 add_clang_subdirectory(clang-refactor)
-if(UNIX)
-  add_clang_subdirectory(clang-shlib)
-endif()
+add_clang_subdirectory(clang-shlib)
 
 if(CLANG_ENABLE_ARCMT)
   add_clang_subdirectory(arcmt-test)
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
  • [PATCH] D73156: [cl... Valentin Churavy via Phabricator via cfe-commits

Reply via email to