LLDB windows build and /bigobj

Hi all,

I pulled in recent changes to upstream llvm, clang and lldb and it seems
to have tipped my windows build over the edge, and its complaining that
my object files have exceeded the section limit.
This error is raised while building the clang libraries. Has anyone
else seen this problem while doing an x64 build with with Visual Studio

This problem can be fixed however by specifying /bigobj as a compiler
flag. The problem is however that this needs to be given to clang,
which in turn inherits most of its cmake from llvm.

I have attached my prospective patch for this issue, but wanted to check
in with the lldb folk first to see if anyone has hit this issue, and if
they would have any feedback before I submit it to llvm.


bigobj_patch.patch (640 Bytes)

Which object file has crossed the limit? When this has happened before, this has usually highlighted over use of templates, which is worth fixing because it speeds up builds on other platforms as well. If MSVC 2015 instead just happens to generate say one extra section per function, then we should probably use bigobj.

Hi Reid,
Thanks for taking a look at this.
Here was the full error:

llvm\tools\clang\lib\ASTMatchers\Dynamic\Registry.cpp : fatal error C1128: number of sections exceeded object file format limit: compile with /bigobj

That file seems to have quite a bit of macro magic going on, so I’ll try to dig deeper into this when I’m back in the office tomorrow.

OK, we’ve had to change that several times now. At this point I think we should just enable bigobj on that specific file. I’ll try to prepare a patch.