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

Reid Kleckner via cfe-dev cfe-dev at lists.llvm.org
Wed Dec 21 10:47:19 PST 2016


We need to fix the build to pass -mbig-obj to the gnu assembler. You can
probably use -DCMAKE_CXX_FLAGS=-Wa,-mbigobj to work around the problem.

I'd add this flag to the llvm build myself, but my mingw64 build of clang
is currently broken for other reasons.

On Mon, Dec 19, 2016 at 1:58 AM, William D. Jones via cfe-dev <
cfe-dev at lists.llvm.org> wrote:

> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20161221/9d537e16/attachment.html>


More information about the cfe-dev mailing list