File tree Expand file tree Collapse file tree 1 file changed +17
-2
lines changed
src/test/run-make-fulldeps/hotplug_codegen_backend Expand file tree Collapse file tree 1 file changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -2,10 +2,25 @@ include ../tools.mk
22
33# ignore-stage1
44
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+
59all :
610 /bin/echo || exit 0 # This test requires /bin/echo to exist
711 $(RUSTC ) the_backend.rs --crate-name the_backend --crate-type dylib \
812 -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+
921 $(RUSTC) some_crate.rs --crate-name some_crate --crate-type lib -o $(TMPDIR)/some_crate \
10- -Z codegen-backend=$(TMPDIR ) /the_backend.dylib -Z unstable-options
11- grep -x " This has been \" compiled\" successfully." $(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
You can’t perform that action at this time.
0 commit comments