llvm-project/lld/test/wasm/static-error.s
Sam Clegg be770edee5
[lld][WebAssembly] Reject shared libraries when -static/-Bstatic is used (#108263)
This matches the behaviour of GNU ld and the ELF version of lld.
2024-09-11 11:22:46 -07:00

13 lines
384 B
ArmAsm

// RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-unknown %s -o %t.o
// RUN: wasm-ld --experimental-pic -shared -o %t.so %t.o
// RUN: wasm-ld --experimental-pic -pie -o /dev/null %t.o %t.so
// RUN: not wasm-ld -o /dev/null -static %t.o %t.so 2>&1 | FileCheck %s
// CHECK: attempted static link of dynamic object
.global _start
_start:
.functype _start () -> ()
end_function