[all-commits] [llvm/llvm-project] 1bb798: [lld][WebAssembly] Set memory limits correctly for...

Sam Clegg via All-commits all-commits at lists.llvm.org
Thu Dec 3 18:21:11 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 1bb79875e4b8f9018142a5155ca3f7df37778419
      https://github.com/llvm/llvm-project/commit/1bb79875e4b8f9018142a5155ca3f7df37778419
  Author: Sam Clegg <sbc at chromium.org>
  Date:   2020-12-03 (Thu, 03 Dec 2020)

  Changed paths:
    M lld/test/wasm/shared-memory.yaml
    M lld/test/wasm/shared.ll
    M lld/wasm/Writer.cpp

  Log Message:
  -----------
  [lld][WebAssembly] Set memory limits correctly for PIC + shared memory

Don't early return from layoutMemory in PIC mode before we have set the
memory limits.

This matters in particular with shared-memory + PIC because shared
memories require maximum size.

Secondly, when we need a maximum, but the user does not supply one,
default to MAX_INT rather than 0 (defaulting to zero is completely
useless and means that building with -shared didn't previously work at
all without --maximum-memory, because zero is never big enough).

This is part of an ongoing effort to enable dynamic linking with
threads in emscripten.

See https://github.com/emscripten-core/emscripten/issues/3494

Differential Revision: https://reviews.llvm.org/D92528




More information about the All-commits mailing list