fork/rust

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

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

master
1.2 KiB26 linesraw
1include ../../run-make/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
9all:
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