[cfe-dev] Building Clang/LLVM with VS2013 for x86 & x64 - problems and questions

David Bakin davidbak at gmail.com
Mon Mar 23 17:22:21 PDT 2015


Hi!  I'm new to Clang/LLVM and I'm trying to use Clang as a parser/semantic
analyzer for a tool I'm trying to write (details on request if you'd
like).  I'm having trouble building, having following directions from the
Clang site, the book "Getting Started with LLVM Core Libraries", and a
couple of other sites mashed together.

a) Using cmake-gui and selecting "Visual Studio 12 2013" I got a set of VS
project files that only had a Win32 configuration, no x64.  So to build x64
it must be necessary to select generator "Visual Studio 12 2013
Win64"?  And therefore 32-bit vs 64-bit determined by the "generator" and
not by LLVM_TARGETS_TO_BUILD (which apparently only has X86 and not also
X64)?

b) That set of project files didn't build DEBUG - I got errors from
projects RTAsan_dynamic.i386 and RTAsan.i386 that they don't build DEBUG
(only RELEASE). (Message from asan_win.cc in both cases.)  Can I just
remove the DEBUG builds from those two projects, thereby building them for
release even in the debug build?  And, for curiosity, what is the actual
limitation there?

c) That set of project files also had an error building
clang_rt.asan-dynamic.i386 with LINK.EXE complaining about a bunch of
switches (that look to me like compiler switches).

18>LINK : warning LNK4044: unrecognized option '/Oy-'; ignored
18>LINK : warning LNK4044: unrecognized option '/GS-'; ignored
18>LINK : warning LNK4044: unrecognized option '/Zi'; ignored
18>LINK : warning LNK4044: unrecognized option '/wd4146'; ignored
18>LINK : warning LNK4044: unrecognized option '/wd4291'; ignored
18>LINK : warning LNK4044: unrecognized option '/wd4391'; ignored
18>LINK : warning LNK4044: unrecognized option '/wd4722'; ignored
18>LINK : warning LNK4044: unrecognized option '/wd4800'; ignored
18>LINK : warning LNK4044: unrecognized option '/GR-'; ignored


What's the fix for that?

d) Finally, I also tried configuring an x64 build using generator "Visual
Studio 12 2013 Win64" but cmake-gui complained at the selections I made as
follows:


CMake Error at tools/llvm-shlib/CMakeLists.txt:48 (message):
Auto-generation not implemented for Win32 without GNU utils. Please
specify LLVM_EXPORTED_SYMBOL_FILE.


What's the proper way to fix that?  By which I mean ... is there some kind
of more complete documentation of the use of CMake in LLVM than
http://llvm.org/docs/CMake.html (the option LLVM_EXPORTED_SYMBOL_FILE
doesn't appear on that page and anyway doesn't sound like that's the real
problem)?

I hope all of you more experienced LLVM developers will put up with a
newbie with newbie questions for awhile.  Thanks in advance! (And let me
know if there's a better place to get questions answered, perhaps SO?)

-- David Bakin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20150323/6208b16b/attachment.html>


More information about the cfe-dev mailing list