[PATCH] [LLD] Add the -stack-size option for Darwin ld.

Rui Ueyama ruiu at google.com
Tue May 19 19:01:46 PDT 2015


LGTM


REPOSITORY
  rL LLVM

================
Comment at: lib/Driver/DarwinLdDriver.cpp:729
@@ +728,3 @@
+      return false;
+    } else if ((stackSizeVal % ctx.pageSize()) != 0) {
+      diagnostics << "error: stack_size must be a multiple of page size ("
----------------
Remove else after return.

================
Comment at: lib/Driver/DarwinLdDriver.cpp:731
@@ +730,3 @@
+      diagnostics << "error: stack_size must be a multiple of page size ("
+                  << llvm::format("0x%" PRIx64, ctx.pageSize()) << ")\n";
+      return false;
----------------
Maybe utohexstr in StringExtras.h would be slightly better?

================
Comment at: lib/ReaderWriter/MachO/MachOLinkingContext.cpp:147
@@ -148,1 +146,3 @@
+      _deadStrippableDylib(false), _printAtoms(false), _testingFileUsage(false),
+      _keepPrivateExterns(false), _demangle(false), _archHandler(nullptr),
       _exportMode(ExportMode::globals),
----------------
FYI: You could use C++11 non-member initializers. This is not a specific comment, though.

http://reviews.llvm.org/D9867

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list