xref: /llvm-project/lld/test/wasm/shared-export-dynamic.s (revision 4ef1f90e4d564b872e3598ccef45adb740eb0f0d)
1# RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-unknown -o %t.o %s
2
3# By default all `default` symbols should be exported
4# RUN: wasm-ld -shared --experimental-pic -o %t.wasm %t.o
5# RUN: obj2yaml %t.wasm | FileCheck %s -check-prefix=DEFAULT
6# DEFAULT: foo
7
8# Verify that `--no-export-dynamic` works with `-shared`
9# RUN: wasm-ld -shared --experimental-pic --no-export-dynamic -o %t2.wasm %t.o
10# RUN: obj2yaml %t2.wasm | FileCheck %s -check-prefix=NO-EXPORT
11# NO-EXPORT-NOT: foo
12
13.globl foo
14
15foo:
16  .functype foo () -> (i32)
17  i32.const 0
18  end_function
19