[PATCH] D102419: [MinGW] Always enable -mbig-obj for LLVM build unless using Clang

Mateusz MikuĊ‚a via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 13 16:29:02 PDT 2021


mati865 added a comment.

Sorry I thought it's simple enough on it's own.

> Previously this was only enabled for 64 bit cases (apparently because with SEH, there are a bit more individual sections than in non-SEH cases?). Does this stem from the fact that we enabled `-ffunction-sections`, which crosses the limit on i686 too?

I just thought why not upstream the patch we've been carrying since 2018 at MSYS2. We have been having recurring error about sections limit, possibly related to some specific LLVM options.
TBH I haven't tested it with main and we haven't enabled `-ffunction-sections`.

> We don't enable it on clang at all (but we did before). IIRC the option is a no-op on clang, and big objects are created where needed only, right?

Exactly, Clang was actually the main motivator to do something about it since there are over 100 useless warnings in our build saying: `clang: warning: argument unused during compilation: '-Wa,-mbig-obj' [-Wunused-command-line-argument]`.

I can revert pointer size check because reproducing and reducing this issue is not worth the time it will take - we can carry it in the repo until we drop 32-bit support.
Avoiding ~30% of the warnings in our build is more important thing for me.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D102419/new/

https://reviews.llvm.org/D102419



More information about the llvm-commits mailing list