[lld][WebAssembly] Error on import/export of mutable global without `mutable-globals...
authorSam Clegg <sbc@chromium.org>
Thu, 23 Jul 2020 22:06:21 +0000 (15:06 -0700)
committerSam Clegg <sbc@chromium.org>
Sat, 12 Sep 2020 21:28:14 +0000 (14:28 -0700)
commit04febd30a8dab3ff4b6e6032f1a1a9f4725f8267
treeda0b4e4018f1580fecfe9f4ad3ec1843736f40bc
parentd6fadc49e3d7eb0977bca3ff92bf156bd059fcd4
[lld][WebAssembly] Error on import/export of mutable global without `mutable-globals` feature

Also add the +mutable-globals features in clang when
building with `-fPIC` since the linker will generate mutable
globals imports and exports in that case.

Differential Revision: https://reviews.llvm.org/D87537
clang/lib/Driver/ToolChains/WebAssembly.cpp
clang/test/Driver/wasm-toolchain.c
lld/test/wasm/Inputs/undefined-globals.s
lld/test/wasm/emit-relocs-fpic.s
lld/test/wasm/gc-imports.s
lld/test/wasm/mutable-globals.s [new file with mode: 0644]
lld/test/wasm/pie.ll
lld/test/wasm/shared.ll
lld/wasm/Writer.cpp