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? If not then I suspect the only solution is to turn on /bigobj on the build bot, right? (Of course, I could refactor the cpp file to several smaller ones, but how do I know where to cut it?) Thanks, Gabor -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20181217/8c4a6897/attachment.html>
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 problems. ~Aaron> (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
rL349357 - we manually add /bigobj quite a bit to fix this sort of thing. Although I don't think anyone ever goes around to check if any entries can ever be removed again... On 17/12/2018 15:12, Gábor Márton via cfe-dev 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? > If not then I suspect the only solution is to turn on /bigobj on the > build bot, right? > (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-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20181217/529ec101/attachment.html>
On Mon, Dec 17, 2018 at 10:19 AM Simon Pilgrim via llvm-dev <llvm-dev at lists.llvm.org> wrote:> > rL349357 - we manually add /bigobj quite a bit to fix this sort of thing. Although I don't think anyone ever goes around to check if any entries can ever be removed again...We usually ask the entries to be removed first and then use /bigobj only when there's not another reasonable option. Since this is a test file, I think it's fine to enable and move on. ~Aaron> > On 17/12/2018 15:12, Gábor Márton via cfe-dev 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? > If not then I suspect the only solution is to turn on /bigobj on the build bot, right? > (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 > > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
Hi Aaron, thanks for your answer.> 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. The corresponding file is a unittest file "ASTImporterTest.cpp" with many gtest macros, which I suspect do quite many template instantiations. I don't think it would be easy to reduce the size in this case, but I am open to any idea. Is it okay to connect with the buildbot owner and ask for /bigobj for this file? Who should approve such decisions? Thanks, Gabor On Mon, Dec 17, 2018 at 4:18 PM Aaron Ballman <aaron at aaronballman.com> wrote:> 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 > problems. > > ~Aaron > > > (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 >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20181217/8b8f05ec/attachment.html>