fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
608 B15 linesraw
1include ../tools.mk
2
3# ignore-cross-compile
4
5# Test to make sure that reachable extern fns are always available in final
6# productcs, including when LTO is used. In this test, the `foo` crate has a
7# reahable symbol, and is a dependency of the `bar` crate. When the `bar` crate
8# is compiled with LTO, it shouldn't strip the symbol from `foo`, and that's the
9# only way that `foo.c` will successfully compile.
10
11all:
12	$(RUSTC) foo.rs --crate-type=rlib
13	$(RUSTC) bar.rs --crate-type=staticlib -C lto -L. -o $(TMPDIR)/libbar.a
14	$(CC) foo.c $(TMPDIR)/libbar.a $(EXTRACFLAGS) $(call OUT_EXE,foo)
15	$(call RUN,foo)