[PATCH] D118405: [LLD][MinGW] Add --heap argument support

Martin Storsjö via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jan 29 14:04:04 PST 2022


This revision was automatically updated to reflect the committed changes.
Closed by commit rG460830a9c664: [LLD][MinGW] Add --heap argument support (authored by mati865, committed by mstorsjo).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D118405/new/

https://reviews.llvm.org/D118405

Files:
  lld/MinGW/Driver.cpp
  lld/MinGW/Options.td
  lld/test/MinGW/driver.test


Index: lld/test/MinGW/driver.test
===================================================================
--- lld/test/MinGW/driver.test
+++ lld/test/MinGW/driver.test
@@ -340,3 +340,8 @@
 
 RUN: ld.lld -### -m i386pep foo.o --disable-stdcall-fixup --enable-stdcall-fixup 2>&1 | FileCheck -check-prefix ENABLE-FIXUP %s
 ENABLE-FIXUP: -stdcall-fixup{{ }}
+
+RUN: ld.lld -### foo.o -m i386pep -heap 8388608,16384 2>&1 | FileCheck -check-prefix=HEAP %s
+RUN: ld.lld -### foo.o -m i386pep --heap 8388608,16384 2>&1 | FileCheck -check-prefix=HEAP %s
+RUN: ld.lld -### foo.o -m i386pep --heap=8388608,16384 2>&1 | FileCheck -check-prefix=HEAP %s
+HEAP: -heap:8388608,16384
Index: lld/MinGW/Options.td
===================================================================
--- lld/MinGW/Options.td
+++ lld/MinGW/Options.td
@@ -66,6 +66,7 @@
 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">;
Index: lld/MinGW/Driver.cpp
===================================================================
--- lld/MinGW/Driver.cpp
+++ lld/MinGW/Driver.cpp
@@ -264,6 +264,8 @@
     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()));


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D118405.404304.patch
Type: text/x-patch
Size: 1676 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220129/c3c319c3/attachment.bin>


More information about the llvm-commits mailing list