X86: repair export compatibility with MinGW/cygwin
authorSaleem Abdulrasool <compnerd@compnerd.org>
Sun, 4 May 2014 00:03:48 +0000 (00:03 +0000)
committerSaleem Abdulrasool <compnerd@compnerd.org>
Sun, 4 May 2014 00:03:48 +0000 (00:03 +0000)
commitf3b2ed749817c0ffc1a22a2055af8ee5afc27a78
treed8fd222ebf5a49cba433f9341429672c32ab34f9
parent6f0d4e358fda7fd7c95106c49b650f1d78000f79
X86: repair export compatibility with MinGW/cygwin

Both MinGW and cygwin (i686) construct export directives without the global
leader prefix.  This is mostly due to the fact that they use GNU ld which does
not correctly handle the export directive.  This apparently has been been broken
for a while.  However, this was recently reported as being broken by
mingwandroid and diorcety of the msys2 project.

Remove the global leader prefix if targeting MinGW or cygwin, otherwise, retain
the global leader prefix.  Add an explicit test for cygwin's behaviour of export
directives.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207926 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86AsmPrinter.cpp
test/CodeGen/X86/dllexport.ll