[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
Loading
Please sign in to comment