[lld] r350464 - [MinGW] Expand comment for MinGW driver. NFC.

Martin Storsjo via llvm-commits llvm-commits at lists.llvm.org
Sat Jan 5 02:44:00 PST 2019


Author: mstorsjo
Date: Sat Jan  5 02:43:59 2019
New Revision: 350464

URL: http://llvm.org/viewvc/llvm-project?rev=350464&view=rev
Log:
[MinGW] Expand comment for MinGW driver. NFC.

Originally authored by Rui Ueyama.

Differential Revision: https://reviews.llvm.org/D53031

Modified:
    lld/trunk/MinGW/Driver.cpp

Modified: lld/trunk/MinGW/Driver.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/MinGW/Driver.cpp?rev=350464&r1=350463&r2=350464&view=diff
==============================================================================
--- lld/trunk/MinGW/Driver.cpp (original)
+++ lld/trunk/MinGW/Driver.cpp Sat Jan  5 02:43:59 2019
@@ -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"




More information about the llvm-commits mailing list