[lld] r318280 - [MinGW] Handle --large-address-aware
Martin Storsjo via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 15 00:18:06 PST 2017
Author: mstorsjo
Date: Wed Nov 15 00:18:06 2017
New Revision: 318280
URL: http://llvm.org/viewvc/llvm-project?rev=318280&view=rev
Log:
[MinGW] Handle --large-address-aware
In GNU ld, this option is only available on i386, not on x86_64
(where it's enabled by default with no option to disable it either).
Differential Revision: https://reviews.llvm.org/D40015
Modified:
lld/trunk/MinGW/Driver.cpp
lld/trunk/MinGW/Options.td
lld/trunk/test/MinGW/driver.test
Modified: lld/trunk/MinGW/Driver.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/MinGW/Driver.cpp?rev=318280&r1=318279&r2=318280&view=diff
==============================================================================
--- lld/trunk/MinGW/Driver.cpp (original)
+++ lld/trunk/MinGW/Driver.cpp Wed Nov 15 00:18:06 2017
@@ -154,6 +154,8 @@ bool mingw::link(ArrayRef<const char *>
Add("-export-all-symbols");
if (!Args.hasArg(OPT_strip_all))
Add("-debug:dwarf");
+ if (Args.hasArg(OPT_large_address_aware))
+ Add("-largeaddressaware");
if (auto *A = Args.getLastArg(OPT_m)) {
StringRef S = A->getValue();
Modified: lld/trunk/MinGW/Options.td
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/MinGW/Options.td?rev=318280&r1=318279&r2=318280&view=diff
==============================================================================
--- lld/trunk/MinGW/Options.td (original)
+++ lld/trunk/MinGW/Options.td Wed Nov 15 00:18:06 2017
@@ -15,6 +15,8 @@ def l: JoinedOrSeparate<["-"], "l">, Met
def m: JoinedOrSeparate<["-"], "m">, HelpText<"Set target emulation">;
def no_whole_archive: F<"no-whole-archive">,
HelpText<"No longer include all object files for following archives">;
+def large_address_aware: Flag<["--"], "large-address-aware">,
+ HelpText<"Enable large addresses">;
def o: JoinedOrSeparate<["-"], "o">, MetaVarName<"<path>">,
HelpText<"Path to file to write output">;
def out_implib: Separate<["--"], "out-implib">, HelpText<"Import library name">;
Modified: lld/trunk/test/MinGW/driver.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/MinGW/driver.test?rev=318280&r1=318279&r2=318280&view=diff
==============================================================================
--- lld/trunk/test/MinGW/driver.test (original)
+++ lld/trunk/test/MinGW/driver.test Wed Nov 15 00:18:06 2017
@@ -89,3 +89,6 @@ DEBUG: -debug:dwarf
RUN: ld.lld -### -m i386pep foo.o -s | FileCheck -check-prefix STRIP %s
RUN: ld.lld -### -m i386pep foo.o --strip-all | FileCheck -check-prefix STRIP %s
STRIP-NOT: -debug:dwarf
+
+RUN: ld.lld -### -m i386pep foo.o --large-address-aware | FileCheck -check-prefix LARGE-ADDRESS-AWARE %s
+LARGE-ADDRESS-AWARE: -largeaddressaware
More information about the llvm-commits
mailing list