[LLVMdev] build failure on mingw gcc 4.9.1

Reid Kleckner rnk at google.com
Tue Jan 27 14:29:11 PST 2015


On Tue, Jan 27, 2015 at 2:45 AM, Michael Spencer <bigcheesegs at gmail.com>
wrote:

> On Tue, Jan 27, 2015 at 10:02 AM, Mueller-Roemer, Johannes Sebastian
> <Johannes.Sebastian.Mueller-Roemer at igd.fraunhofer.de> wrote:
> > Adding -D__MSVCRT_VERSION__=0x900 (or higher) to CMAKE_CXX_FLAGS and
> > -lmsvcr90 (or higher) to CMAKE_CXX_STANDARD_LIBRARIES appears to work.
> > -lmsvcrt80 does not work, contrary to the comment on the MinGW bug
> tracker.
> > However, if you do not have the runtimes installed, errors will occur
> later
> > on in the build process, such as:
> >
> > [215/1199] Building Intrinsics.gen...
> >
> > FAILED: cmd.exe /c cd D:\Slave\llvm-mingw\buildMinGW\include\llvm\IR &&
> > D:\Slave\llvm-mingw\buildMinGW\bin\llvm-tblgen.exe -gen-intrinsic -I
> > D:/Slave/llvm-mingw/build/include/llvm/IR -I
> > D:/Slave/llvm-mingw/build/lib/Target -I D:/Slave/llvm-mingw/build/include
> > D:/Slave/llvm-mingw/build/include/llvm/IR/Intrinsics.td -o
> > D:/Slave/llvm-mingw/buildMinGW/include/llvm/IR/Intrinsics.gen.tmp
> >
> >
> >
> > As I do not have administrative privileges on the machine, I switched to
> > MSVCRT100, as those runtimes were already installed. Which leads me to
> the
> > question: Should the exact MSVCRT version be selectable or should the
> lowest
> > version necessary (9.0) be used?
> >
>
> Is there any way for CMake to detect which version of MSVCRT is
> present? Otherwise there's really no default we can give. If not, then
> we'll have to disable the error UI suppression on mingw.
>

On MinGW, we could use GetProcAddress and GetModuleHandle(dllname) for all
dll names in { "msvcrt120", "msvcrt110", ... }, as horrible as that is.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150127/2de6d58d/attachment.html>


More information about the llvm-dev mailing list