1; RUN: llc -filetype=obj %s -o %t.o
2; RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-unknown %p/Inputs/call-indirect.s -o %t2.o
3; RUN: wasm-ld --export-dynamic -o %t.wasm %t2.o %t.o
4; RUN: obj2yaml %t.wasm | FileCheck %s
5; RUN: wasm-ld --export-dynamic -O2 -o %t-opt.wasm %t2.o %t.o
6; RUN: obj2yaml %t-opt.wasm | FileCheck %s
7; RUN: not wasm-ld --compress-relocations -o %t-compressed.wasm %t2.o %t.o 2>&1 | FileCheck %s -check-prefix=ERROR
8; RUN: wasm-ld --export-dynamic --strip-debug --compress-relocations -o %t-compressed.wasm %t2.o %t.o
9; RUN: obj2yaml %t-compressed.wasm | FileCheck %s -check-prefix=COMPRESS
10
11target triple = "wasm32-unknown-unknown-wasm"
12
13define i32 @foo() {
14entry:
15  ret i32 2
16}
17
18define void @_start() local_unnamed_addr {
19entry:
20  ret void
21}
22
23; ERROR: wasm-ld: error: --compress-relocations is incompatible with output debug information. Please pass --strip-debug or --strip-all
24
25; CHECK:    Body:            28028088808000118080808000001A28028488808000118180808000001A0B
26; COMPRESS: Body:            280280081100001A280284081101001A0B
27