[llvm] r236654 - Fix link failure on MinGW due to use of CoInitialize.

Zachary Turner zturner at google.com
Wed May 6 15:26:51 PDT 2015


Author: zturner
Date: Wed May  6 17:26:51 2015
New Revision: 236654

URL: http://llvm.org/viewvc/llvm-project?rev=236654&view=rev
Log:
Fix link failure on MinGW due to use of CoInitialize.

ole32 is considered a default library with MSVC, but apparently
not with MinGW.  Since we use CoInitialize, we need to explicitly
link against it in LLVMSupport for a MinGW build.

Modified:
    llvm/trunk/lib/Support/CMakeLists.txt

Modified: llvm/trunk/lib/Support/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/CMakeLists.txt?rev=236654&r1=236653&r2=236654&view=diff
==============================================================================
--- llvm/trunk/lib/Support/CMakeLists.txt (original)
+++ llvm/trunk/lib/Support/CMakeLists.txt Wed May  6 17:26:51 2015
@@ -1,7 +1,7 @@
 set(system_libs)
 if( NOT MSVC )
   if( MINGW )
-    set(system_libs ${system_libs} imagehlp psapi shell32)
+    set(system_libs ${system_libs} imagehlp psapi shell32 ole32)
   elseif( CMAKE_HOST_UNIX )
     if( HAVE_LIBRT )
       set(system_libs ${system_libs} rt)





More information about the llvm-commits mailing list