]> git.lizzy.rs Git - rust.git/blob - src/test/run-make-fulldeps/hotplug_codegen_backend/Makefile
Auto merge of #95602 - scottmcm:faster-array-intoiter-fold, r=the8472
[rust.git] / src / test / run-make-fulldeps / hotplug_codegen_backend / Makefile
1 include ../tools.mk
2
3 # ignore-stage1
4
5 # This test both exists as a check that -Zcodegen-backend is capable of loading external codegen
6 # backends and that this external codegen backend is only included in the dep info if
7 # -Zbinary-dep-depinfo is used.
8
9 all:
10         /bin/echo || exit 0 # This test requires /bin/echo to exist
11         $(RUSTC) the_backend.rs --crate-name the_backend --crate-type dylib \
12                 -o $(TMPDIR)/the_backend.dylib
13
14         $(RUSTC) some_crate.rs --crate-name some_crate --crate-type lib -o $(TMPDIR)/some_crate \
15                 -Z codegen-backend=$(TMPDIR)/the_backend.dylib -Z unstable-options \
16                 --emit link,dep-info
17         grep -x "This has been \"compiled\" successfully." $(TMPDIR)/libsome_crate.rlib
18         # don't declare a dependency on the codegen backend if -Zbinary-dep-depinfo isn't used.
19         grep -v "the_backend.dylib" $(TMPDIR)/some_crate.d
20         
21         $(RUSTC) some_crate.rs --crate-name some_crate --crate-type lib -o $(TMPDIR)/some_crate \
22                 -Z codegen-backend=$(TMPDIR)/the_backend.dylib -Z unstable-options \
23                 --emit link,dep-info -Zbinary-dep-depinfo
24         grep -x "This has been \"compiled\" successfully." $(TMPDIR)/libsome_crate.rlib
25         # but declare a dependency on the codegen backend if -Zbinary-dep-depinfo it used.
26         grep "the_backend.dylib" $(TMPDIR)/some_crate.d