diff options
| author | Martin Storsjo <martin@martin.st> | 2017-11-15 08:18:06 +0000 |
|---|---|---|
| committer | Martin Storsjo <martin@martin.st> | 2017-11-15 08:18:06 +0000 |
| commit | 3c8d4b5a73c56737bdb44c851cc5d969967b76f5 (patch) | |
| tree | 722f13869efb2fa2e9c9250d687579fba4db0536 | |
| parent | 6e60297ee6ba465197db443f8eaa88315ba36ac4 (diff) | |
| download | bcm5719-llvm-3c8d4b5a73c56737bdb44c851cc5d969967b76f5.tar.gz bcm5719-llvm-3c8d4b5a73c56737bdb44c851cc5d969967b76f5.zip | |
[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
llvm-svn: 318280
| -rw-r--r-- | lld/MinGW/Driver.cpp | 2 | ||||
| -rw-r--r-- | lld/MinGW/Options.td | 2 | ||||
| -rw-r--r-- | lld/test/MinGW/driver.test | 3 |
3 files changed, 7 insertions, 0 deletions
diff --git a/lld/MinGW/Driver.cpp b/lld/MinGW/Driver.cpp index ecdf7d06571..eab917c972d 100644 --- a/lld/MinGW/Driver.cpp +++ b/lld/MinGW/Driver.cpp @@ -154,6 +154,8 @@ bool mingw::link(ArrayRef<const char *> ArgsArr, raw_ostream &Diag) { 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(); diff --git a/lld/MinGW/Options.td b/lld/MinGW/Options.td index 595a08357f3..dca7de17863 100644 --- a/lld/MinGW/Options.td +++ b/lld/MinGW/Options.td @@ -15,6 +15,8 @@ def l: JoinedOrSeparate<["-"], "l">, MetaVarName<"<libName>">, 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">; diff --git a/lld/test/MinGW/driver.test b/lld/test/MinGW/driver.test index c3c7005450a..5270434b062 100644 --- a/lld/test/MinGW/driver.test +++ b/lld/test/MinGW/driver.test @@ -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 |

