fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1# ignore-cross-compile 2# This test makes sure all generic instances get re-exported from Rust dylibs for use by 3# `-Zshare-generics`. There are two rlibs (`instance_provider_a` and `instance_provider_b`) 4# which both provide an instance of `Cell<i32>::set`. There is `instance_user_dylib` which is 5# supposed to re-export both these instances, and then there are `instance_user_a_rlib` and 6# `instance_user_b_rlib` which each rely on a specific instance to be available. 7# 8# In the end everything is linked together into `linked_leaf`. If `instance_user_dylib` does 9# not export both then we'll get an `undefined reference` error for one of the instances. 10# 11# This is regression test for https://github.com/rust-lang/rust/issues/67276. 12 13include ../tools.mk 14 15COMMON_ARGS=-Cprefer-dynamic -Zshare-generics=yes -Ccodegen-units=1 -Csymbol-mangling-version=v0 16 17all: 18 $(RUSTC) instance_provider_a.rs $(COMMON_ARGS) --crate-type=rlib 19 $(RUSTC) instance_provider_b.rs $(COMMON_ARGS) --crate-type=rlib 20 $(RUSTC) instance_user_dylib.rs $(COMMON_ARGS) --crate-type=dylib 21 $(RUSTC) instance_user_a_rlib.rs $(COMMON_ARGS) --crate-type=rlib 22 $(RUSTC) instance_user_b_rlib.rs $(COMMON_ARGS) --crate-type=rlib 23 $(RUSTC) linked_leaf.rs $(COMMON_ARGS) --crate-type=bin