aboutsummaryrefslogtreecommitdiff
path: root/lld/MinGW
diff options
context:
space:
mode:
authorMateusz Mikuła <mati865@gmail.com>2022-01-29 23:36:50 +0200
committerMartin Storsjö <martin@martin.st>2022-01-30 00:01:45 +0200
commit460830a9c664e8cce959c660648faa7747ad8bdc (patch)
tree1f926ce2c53794a6cb25ab799d60c9be895eae8e /lld/MinGW
parent067650fd12fccf44de1d7c148b50658831c672b0 (diff)
downloadllvm-460830a9c664e8cce959c660648faa7747ad8bdc.zip
llvm-460830a9c664e8cce959c660648faa7747ad8bdc.tar.gz
llvm-460830a9c664e8cce959c660648faa7747ad8bdc.tar.bz2
[LLD][MinGW] Add --heap argument support
Noticed in https://github.com/msys2/MINGW-packages/pull/10567. Differential Revision: https://reviews.llvm.org/D118405
Diffstat (limited to 'lld/MinGW')
-rw-r--r--lld/MinGW/Driver.cpp2
-rw-r--r--lld/MinGW/Options.td1
2 files changed, 3 insertions, 0 deletions
diff --git a/lld/MinGW/Driver.cpp b/lld/MinGW/Driver.cpp
index 10ff7cf..93a2664 100644
--- a/lld/MinGW/Driver.cpp
+++ b/lld/MinGW/Driver.cpp
@@ -264,6 +264,8 @@ bool mingw::link(ArrayRef<const char *> argsArr, llvm::raw_ostream &stdoutOS,
add("-filealign:" + StringRef(a->getValue()));
if (auto *a = args.getLastArg(OPT_section_alignment))
add("-align:" + StringRef(a->getValue()));
+ if (auto *a = args.getLastArg(OPT_heap))
+ add("-heap:" + StringRef(a->getValue()));
if (auto *a = args.getLastArg(OPT_o))
add("-out:" + StringRef(a->getValue()));
diff --git a/lld/MinGW/Options.td b/lld/MinGW/Options.td
index 019ff74..b96449f 100644
--- a/lld/MinGW/Options.td
+++ b/lld/MinGW/Options.td
@@ -66,6 +66,7 @@ defm file_alignment: Eq<"file-alignment", "Set file alignment">;
defm gc_sections: B<"gc-sections",
"Remove unused sections",
"Don't remove unused sections">;
+defm heap: Eq<"heap", "Set size of the initial heap">;
def help: F<"help">, HelpText<"Print option help">;
defm high_entropy_va: B_disable<"high-entropy-va",
"Set the 'high entropy VA' flag", "Don't set the 'high entropy VA' flag">;