xref: /llvm-project/lld/test/wasm/mutable-globals.s (revision 9647a6f719ee4b1c23eea7aef368c1dcd5317949)
1# RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-unknown -o %t.o %s
2# RUN: not wasm-ld %t.o -o %t.wasm 2>&1 | FileCheck %s
3# RUN: wasm-ld --features=mutable-globals %t.o -o %t.wasm
4
5.globaltype foo, i32
6
7.globl _start
8_start:
9  .functype _start () -> ()
10  i32.const 1
11  global.set foo
12  end_function
13
14.import_module foo, env
15.import_name foo, foo
16
17# CHECK: error: mutable global imported but 'mutable-globals' feature not present in inputs: `foo`. Use --no-check-features to suppress.
18