[lld] [llvm] [lld][WebAssembly] Support for the custom-page-sizes WebAssembly proposal (PR #128942)

Nick Fitzgerald via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 28 12:13:32 PST 2025


================
@@ -455,8 +456,10 @@ void Writer::layoutMemory() {
   }
 
   if (ctx.arg.initialMemory != 0) {
-    if (ctx.arg.initialMemory != alignTo(ctx.arg.initialMemory, WasmPageSize))
-      error("initial memory must be " + Twine(WasmPageSize) + "-byte aligned");
+    if (ctx.arg.initialMemory !=
+        alignTo(ctx.arg.initialMemory, ctx.arg.pageSize))
+      error("initial memory must be aligned to the page size (" +
+            Twine(ctx.arg.pageSize) + " bytes)");
----------------
fitzgen wrote:

Good idea, added.

https://github.com/llvm/llvm-project/pull/128942


More information about the llvm-commits mailing list