[cfe-dev] "File too big/too many sections" when building Registry.cpp in MSYS2 Environment

Frank Redeker via cfe-dev cfe-dev at lists.llvm.org
Mon Dec 19 05:29:10 PST 2016


Am 19.12.2016 um 10:58 schrieb William D. Jones via cfe-dev:
> Hello all,
>
> I'm (re)building a copy of Clang 3.9 for a git fork of LLVM (or1k) that
> tracks 3.9 but is not yet merged into LLVM proper. The last merge from
> the main Clang codebase was on Aug 11, release_39. When building, LLVM
> seems to compile fine. However, with Clang I am running into the
> following error as shown in this gist:
> https://gist.github.com/cr1901/d5a4e8f1df6049c00c6f02f08e7f8488
>
> Just to test, I have also confirmed that this same error occurs as of
> commit 54f5752c, release_39 branch, on the LLVM Github mirror. I have
> not tried HEAD of master, or SVN r290090 as of this writing. I also have
> not tried compiling an LLVM/Clang using MSVC, and am not currently in a
> position to try.
>
> According to this linked post, this error has occurred during Windows
> builds before:
> http://lists.llvm.org/pipermail/cfe-dev/2013-June/030024.html I know a
> stopgap solution is to introduce the –bigobj flag to the linker, but I
> was under the impression from another linked post-
> http://lists.llvm.org/pipermail/llvm-dev/2014-May/072642.html- that the
> flag should not be required, and some unit tests fail when –bigobj is
> enabled.
>
> Are the above posts out of date, and the flag is now required? Are there
> any special options (besides overriding LDFLAGS directly) I may have
> forgot when generating the Makefiles? Building a Release build is not
> desirable for me for various reasons. My current LLVM/Clang, built in
> much the same way, is 3.5, so I know that in the past, too many sections
> wasn't an issue :).
>
> Thanks for any help in advance! Sincerely,
>
> --
> William D. Jones
> thor0505 at comcast.net
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
>
>
Hallo William,

a few days ago I ran into the same problem when updating to 3.9. 
Compiling with option '-Og' did the trick for me.

My GCC version is:

$ g++ --version
g++.exe (Rev2, Built by MSYS2 project) 6.2.0


Frank




More information about the cfe-dev mailing list