[PATCH] D36379: LLVM: Make GNU COFF Aligncomm optional

David Majnemer via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 9 11:07:02 PDT 2017

majnemer added a comment.

In https://reviews.llvm.org/D36379#833783, @martell wrote:

> In https://reviews.llvm.org/D36379#833526, @majnemer wrote:
> > GCC already has such a flag, it calls it `-mpe-aligned-commons` and it is on by default. I don't think we should stop emitting aligncomm for GNU targets by default, we shouldn't (and don't AFAIK) emit aligncomm for MSVC targets.
> Thanks @majnemer, in that case we should also have a flag `-mpe-aligned-commons` and be able to call `-mno-pe-aligned-commons` to disable it for mingw at compile time if desired.
>  The question I have is generally about how we propagate this flag all the way down into llvm in `MCWinCOFFStreamer.cpp`

MCTargetOptions is where this would live. Take a look at how MCIncrementalLinkerCompatible and MCRelaxAll are implemented.

Comment at: lib/MC/MCWinCOFFStreamer.cpp:227-228
+  if (ByteAlignment > 32) {
+    if (T.isKnownWindowsMSVCEnvironment())
+      report_fatal_error("alignment is limited to 32-bytes");
+    else {
Use parens consistently.



More information about the llvm-commits mailing list