37 lines
1.4 KiB
Diff
37 lines
1.4 KiB
Diff
From 6832b520f918211609cb0b6ee427e922720d4803 Mon Sep 17 00:00:00 2001
|
|
From: Martell Malone <martellmalone@gmail.com>
|
|
Date: Tue, 16 Aug 2016 12:55:01 -0700
|
|
Subject: [PATCH 1/5] mingw-w64: use MSVC style ByteAlignment
|
|
|
|
We can do alignment without -aligncomm derectives in PE COFF
|
|
Until we support GNU style in lld we should use this
|
|
---
|
|
lib/MC/MCWinCOFFStreamer.cpp | 4 ++--
|
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/lib/MC/MCWinCOFFStreamer.cpp b/lib/MC/MCWinCOFFStreamer.cpp
|
|
index bf341bb1f45..3b3fecfc1d7 100644
|
|
--- a/lib/MC/MCWinCOFFStreamer.cpp
|
|
+++ b/lib/MC/MCWinCOFFStreamer.cpp
|
|
@@ -222,7 +222,7 @@ void MCWinCOFFStreamer::EmitCommonSymbol(MCSymbol *S, uint64_t Size,
|
|
auto *Symbol = cast<MCSymbolCOFF>(S);
|
|
|
|
const Triple &T = getContext().getObjectFileInfo()->getTargetTriple();
|
|
- if (T.isKnownWindowsMSVCEnvironment()) {
|
|
+ if (T.getEnvironment() != Triple::Cygnus) {
|
|
if (ByteAlignment > 32)
|
|
report_fatal_error("alignment is limited to 32-bytes");
|
|
|
|
@@ -234,7 +234,7 @@ void MCWinCOFFStreamer::EmitCommonSymbol(MCSymbol *S, uint64_t Size,
|
|
Symbol->setExternal(true);
|
|
Symbol->setCommon(Size, ByteAlignment);
|
|
|
|
- if (!T.isKnownWindowsMSVCEnvironment() && ByteAlignment > 1) {
|
|
+ if (T.getEnvironment() == Triple::Cygnus && ByteAlignment > 1) {
|
|
SmallString<128> Directive;
|
|
raw_svector_ostream OS(Directive);
|
|
const MCObjectFileInfo *MFI = getContext().getObjectFileInfo();
|
|
--
|
|
2.13.3
|
|
|