[WebAssembly] "atomics" feature requires shared memory
authorThomas Lively <tlively@google.com>
Fri, 29 Mar 2019 20:43:49 +0000 (20:43 +0000)
committerThomas Lively <tlively@google.com>
Fri, 29 Mar 2019 20:43:49 +0000 (20:43 +0000)
commit06391f34bd4ec04a2f0e9376b99d7821185eabb2
tree36896d9ab7d5609abc86003683dda82dc837c860
parent54f7118de5b9bd7d1b2a4b5ba1e9662c22104d91
[WebAssembly] "atomics" feature requires shared memory

Summary:
Makes it a linker error if the "atomics" feature is used but the user
does not opt in to shared memory or if "atomics" is disallowed but the
user does opt in to shared memory. Also check that an appropriate max
memory size is supplied if shared memory is used.

Reviewers: sbc100, aheejin

Subscribers: dschuff, jgravelle-google, sunfish, jfb, llvm-commits

Tags: #llvm

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

llvm-svn: 357310
lld/test/wasm/shared-memory-no-atomics.yaml [new file with mode: 0644]
lld/test/wasm/shared-memory.yaml [new file with mode: 0644]
lld/wasm/Writer.cpp