llvm-capstone/lld/test/wasm/ctor-no-gc.test
Dan Gohman 950ae43091 [WebAssembly] GC constructor functions in otherwise unused archive objects
This allows `__wasilibc_populate_libpreopen` to be GC'd in more cases
where it isn't needed, including when linked from Rust's libstd.

Differential Revision: https://reviews.llvm.org/D85062
2020-10-12 18:54:57 -07:00

13 lines
631 B
Plaintext

; Like ctor-gc-setup.test, but it calls a different function, so it does pull
; in the object containing `ctor`, so `ctor` is linked in.
;
; RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-unknown %p/Inputs/ctor-ctor.s -o %t.ctor.o
; RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-unknown %p/Inputs/ctor-lib.s -o %t.lib.o
; RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-unknown %p/Inputs/ctor-setup-call-def.s -o %t.setup-call-def.o
; RUN: rm -f %t.lib.a
; RUN: llvm-ar rcs %t.lib.a %t.lib.o %t.ctor.o
; RUN: wasm-ld %t.setup-call-def.o %t.lib.a -o %t.wasm
; RUN: obj2yaml %t.wasm | FileCheck %s
; CHECK: Name: test_ctor