1 Test that --export will also fetch lazy symbols from archives
3 RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-unknown %p/Inputs/start.s -o %t.o
4 RUN: llc -filetype=obj %S/Inputs/archive1.ll -o %t.a1.o
5 RUN: llc -filetype=obj %S/Inputs/archive2.ll -o %t.a2.o
7 RUN: llvm-ar rcs %t.a %t.a1.o %t.a2.o
8 RUN: wasm-ld --export-dynamic --export=archive2_symbol -o %t.wasm %t.a %t.o
9 RUN: obj2yaml %t.wasm | FileCheck %s
10 RUN: wasm-ld --export-dynamic -o %t.wasm %t.a %t.o
11 RUN: obj2yaml %t.wasm | FileCheck %s -check-prefix=NOEXPORT
14 CHECK-NEXT: - Name: memory
15 CHECK-NEXT: Kind: MEMORY
17 CHECK-NEXT: - Name: foo
18 CHECK-NEXT: Kind: FUNCTION
20 CHECK-NEXT: - Name: bar
21 CHECK-NEXT: Kind: FUNCTION
23 CHECK-NEXT: - Name: archive2_symbol
24 CHECK-NEXT: Kind: FUNCTION
26 CHECK-NEXT: - Name: _start
27 CHECK-NEXT: Kind: FUNCTION
29 CHECK-NEXT: - Type: CODE
32 NOEXPORT-NEXT: - Name: memory
33 NOEXPORT-NEXT: Kind: MEMORY
34 NOEXPORT-NEXT: Index: 0
35 NOEXPORT-NEXT: - Name: _start
36 NOEXPORT-NEXT: Kind: FUNCTION
37 NOEXPORT-NEXT: Index: 0
38 NOEXPORT-NEXT: - Type: CODE