aboutsummaryrefslogtreecommitdiff
path: root/lld/MinGW
diff options
context:
space:
mode:
authorMartin Storsjo <martin@martin.st>2019-01-05 10:43:59 +0000
committerMartin Storsjo <martin@martin.st>2019-01-05 10:43:59 +0000
commit5abe10ac210893178a17d3863707340f2cadbb30 (patch)
tree8fee20ef3543b5f3012e702736a8fc336a3e8c4e /lld/MinGW
parent65038515ee4465d20103b2c32b337a76a2c63b53 (diff)
downloadllvm-project-5abe10ac210893178a17d3863707340f2cadbb30.tar.gz
[MinGW] Expand comment for MinGW driver. NFC.
Originally authored by Rui Ueyama. Differential Revision: https://reviews.llvm.org/D53031 llvm-svn: 350464
Diffstat (limited to 'lld/MinGW')
-rw-r--r--lld/MinGW/Driver.cpp24
1 files changed, 21 insertions, 3 deletions
diff --git a/lld/MinGW/Driver.cpp b/lld/MinGW/Driver.cpp
index d682baf592a1..def769bb9125 100644
--- a/lld/MinGW/Driver.cpp
+++ b/lld/MinGW/Driver.cpp
@@ -6,9 +6,27 @@
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
-///
-/// GNU ld style linker driver for COFF currently supporting mingw-w64.
-///
+//
+// MinGW is a GNU development environment for Windows. It consists of GNU
+// tools such as GCC and GNU ld. Unlike Cygwin, there's no POSIX-compatible
+// layer, as it aims to be a native development toolchain.
+//
+// lld/MinGW is a drop-in replacement for GNU ld/MinGW.
+//
+// Being a native development tool, a MinGW linker is not very different from
+// Microsoft link.exe, so a MinGW linker can be implemented as a thin wrapper
+// for lld/COFF. This driver takes Unix-ish command line options, translates
+// them to Windows-ish ones, and then passes them to lld/COFF.
+//
+// When this driver calls the lld/COFF driver, it passes a hidden option
+// "-lldmingw" along with other user-supplied options, to run the lld/COFF
+// linker in "MinGW mode".
+//
+// There are subtle differences between MS link.exe and GNU ld/MinGW, and GNU
+// ld/MinGW implements a few GNU-specific features. Such features are directly
+// implemented in lld/COFF and enabled only when the linker is running in MinGW
+// mode.
+//
//===----------------------------------------------------------------------===//
#include "lld/Common/Driver.h"