[cfe-dev] [llvm-dev] Windows /bigobj

Aaron Ballman via cfe-dev cfe-dev at lists.llvm.org
Mon Dec 17 07:18:10 PST 2018

On Mon, Dec 17, 2018 at 10:12 AM Gábor Márton via llvm-dev
<llvm-dev at lists.llvm.org> wrote:
> Hi,
> Recently one Windows build bot failed by my commit, because the obj file being generated is too big:
> C:\ps4-buildslave2\llvm-clang-x86_64-expensive-checks-win\llvm\tools\clang\unittests\AST\ASTImporterTest.cpp : fatal error C1128: number of sections exceeded object file format limit: compile with /bigobj
> Is there an LLVM policy to limit the maximum size of the generated obj files?

We usually try to limit it in cases where it makes sense to do so.
e.g., for a while we would put in efforts to reduce the number of
template instantiations to help avoid this problem. However, I believe
we only do that up to a point.

> If not then I suspect the only solution is to turn on /bigobj on the build bot, right?

We already required that for some files; we turn on /bigobj support
for several files in Clang. We usually only do this on a file-by-file
basis though, so we can be alerted when new files are causing


> (Of course, I could refactor the cpp file to several smaller ones, but how do I know where to cut it?)
> Thanks,
> Gabor
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev

More information about the cfe-dev mailing list