[PATCH] Fix for LLVM debug build failure on Windows + MSVC2010SP1

Manish Verma Manish.Verma at arm.com
Fri Jun 7 08:38:45 PDT 2013


Hi Aaron,

> We have more than 65535 sections in a single object file?  That seems
> rather large to me; I wonder if that was intended behavior.
Good question! The source file doesn't look very big. I wonder what is
causing MSVC to generate these many sections in single object file.

> According to MSDN, /bigobj works as far back as VS 2005; do you see
> that it fails in practice?  If so, it's not a big deal, we really
> only
> care about 2010 and up at this point.
I don't think even today LLVM can be built with VC++ 2005. So, I guess
this shouldn't be a problem in practice. Plus, if and when, LLVM moves
to C++11, older MSVC wouldn't be supported anyway.

Manish

> -----Original Message-----
> From: aaron.ballman at gmail.com [mailto:aaron.ballman at gmail.com] On
> Behalf Of Aaron Ballman
> Sent: 07 June 2013 16:15
> To: Manish Verma
> Cc: llvm-commits
> Subject: Re: [PATCH] Fix for LLVM debug build failure on Windows +
> MSVC2010SP1
>
> We have more than 65535 sections in a single object file?  That seems
> rather large to me; I wonder if that was intended behavior.
>
> According to MSDN, /bigobj works as far back as VS 2005; do you see
> that it fails in practice?  If so, it's not a big deal, we really
> only
> care about 2010 and up at this point.
>
> ~Aaron
>
> On Fri, Jun 7, 2013 at 10:59 AM, Manish Verma <manish.verma at arm.com>
> wrote:
> > Hi,
> >
> > We have recently found that the debug builds on Windows are failing
> when
> > compiled with MSVC 2010SP1. The failure message generated is the
> following:
> >
> >
> f:\work\src\llvm\tools\clang\include\clang\astmatchers\astmatchersint
> ernal.h
> > (266): fatal error C1128: number of sections exceeded object file
> format
> > limit : compile with /bigobj
> > [F:\work\build\win_32-linkMT-x86_64\cl_16.00.40219.01-
> vs\dbg\llvm\tools\clan
> > g\lib\ASTMatchers\Dynamic\clangDynamicASTMatchers.vcxproj]
> >
> > A similar build failure is also reported today in
> > http://lists.cs.uiuc.edu/pipermail/cfe-dev/2013-June/030043.html.
> >
> > Please find attached a patch which fixes the build failure and adds
> /bigobj
> > option to CXX_FLAGS for debug builds.
> >
> > One of the downside of this patch is that the debug builds of LLVM
> can no
> > longer done using Visual Studio C++ 2005 or previous versions.
> Otherwise, I
> > couldn't find any other downside of using /bigobj option.
> >
> > Manish
> > _______________________________________________
> > llvm-commits mailing list
> > llvm-commits at cs.uiuc.edu
> > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
> >


-- IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium.  Thank you.




More information about the llvm-commits mailing list