Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / lld / test / wasm / lto / pic-empty.s
blob4fe4dffda1dcbee36450b38a1c1641a4fe86621c
1 ; Test that LTO objects with no function can still be linked as shared
2 ; libraries.
3 ; We had a bug where the mutable-globals feature was not being added
4 ; so the linker-generated import of `__stack_pointer` (which is currently
5 ; mandatory for ; shared libraries) was generating a linker error.
6 ; See https://github.com/llvm/llvm-project/issues/51681.
8 ; RUN: llvm-as %s -o %t.o
9 ; RUN: wasm-ld --lto-O2 --experimental-pic -shared --no-gc-sections --export=tls_int %t.o -o %t.so
10 ; RUN: obj2yaml %t.so | FileCheck %s
12 target datalayout = "e-m:e-p:32:32-p10:8:8-p20:8:8-i64:64-f128:64-n32:64-S128-ni:1:10:20"
13 target triple = "wasm32-unknown-emscripten"
15 @tls_int = dso_local thread_local global i32 99
17 ; CHECK: - Type: CUSTOM
18 ; CHECK: Name: target_features
19 ; CHECK: Features:
20 ; CHECK: - Prefix: USED
21 ; CHECK: Name: mutable-globals