[Lldb-commits] MSVC12 support
Virgile Bello
virgile.bello at gmail.com
Wed Aug 28 07:51:41 PDT 2013
Sorry, my bad, just noticed it won't work anyway because getopt.h is in
some public header so any project including it won't work.
I will go back to my previous way of doing (I changed it right before the
patch during cleanup), so two options:
(1) In five different locations:
#ifdef _MSC_VER
#include "lldb/Host/msvc/getopt.h"
#else
#include <getopt.h>
#endif
(2) I do a lldb/lldb-getopt.h
I suppose (1) is better?
Anyway, I attach a fixed patch for version (1) in the meantime.
On Wed, Aug 28, 2013 at 10:53 PM, Virgile Bello <virgile.bello at gmail.com>wrote:
> Hello,
>
> Here is the tentative patch for MSVC12 support. Actually much smaller than
> MinGW32 one (1/3).
> Need some improvements/reviews. Some points that might need some
> discussion:
>
> * getopt.h doesn't exist. Also, current inttypes.h doesn't work well
> (should be fixed in final release so it will be removed later).
> As a result, I added a folder include/msvc that can override some system
> include.
> I wanted to make sure it was OK to do so? If yes, is this folder OK or
> somewhere else maybe?
> Otherwise, I could always add lot of #ifdef around each <getopt.h>
> include, but that might be ugly.
> Note that MSVC11 might also need some more additional includes as well
> (need to check).
>
> * Most of the other fixes are related to some subtle difference in
> templates instantiation, as well as friend class within namespace that
> needs forward declaration (cf CommandObjectBreakpointCommandAdd
> and CommandObjectProcessLaunch)..
>
> * Also, I added backslash separator for paths in FileSpec.cpp (apply for
> MinGW32 as well).
> I might commit this separately if the MSVC patch takes some time to be
> cleared out.
>
> * Only thing left to fix before it compiles is a MinGW32/MSVC compilation
> error introduced yesterday by r189316 (otherwise it would probably have
> been enough).
> It's due to windows.h and llvm/Support/COFF.h conflicting #define/enum. I
> hope to get this fixed in LLVM soon too.
>
> * I think the only thing I didn't include is a few printf("%zx") in
> logging that needs to be fixed here and there (will be in a separate patch).
>
> Compilation OK on Linux.
>
> Thanks,
> Virgile
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20130828/e78deb38/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lldb-msvc12-v2.diff
Type: application/octet-stream
Size: 40636 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20130828/e78deb38/attachment.obj>
More information about the lldb-commits
mailing list