Error when trying to build LLVM with mingw.org

Yaron Keren via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 31 12:50:27 PDT 2015


See attached patch.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150831/ea6b321f/attachment.html>
-------------- next part --------------
Index: CMakeLists.txt
===================================================================
--- CMakeLists.txt	(revision 246390)
+++ CMakeLists.txt	(working copy)
@@ -571,6 +571,14 @@
   # People report that -O3 is unreliable on MinGW. The traditional
   # build also uses -O2 for that reason:
   llvm_replace_compiler_option(CMAKE_CXX_FLAGS_RELEASE "-O3" "-O2")
+  # MinGW.org misses some C++11 features, require MinGW-w64.
+  execute_process(COMMAND ${CMAKE_CXX_COMPILER} -dumpmachine
+                  OUTPUT_VARIABLE GCC_TARGET_MACHINE
+                  OUTPUT_STRIP_TRAILING_WHITESPACE)
+  if( NOT GCC_TARGET_MACHINE MATCHES "w64" )
+    message(FATAL_ERROR "MinGW.org disribution is not supported.
+    Please use a MinGW-w64 distribution.")
+  endif()
 endif()
 
 # Put this before tblgen. Else we have a circular dependence.


More information about the llvm-commits mailing list