3 # This example shows how to implement a rustc driver that retrieves MIR bodies
4 # together with the borrow checker information.
7 # $ ./x.py test src/test/run-make-fulldeps/obtain-borrowck
9 DRIVER_BINARY := "$(TMPDIR)"/driver
10 SYSROOT := $(shell $(RUSTC) --print sysroot)
13 LIBSTD := -L "$(SYSROOT)\\lib\\rustlib\\$(TARGET)\\lib"
19 $(RUSTC) driver.rs -o "$(DRIVER_BINARY)"
20 $(TARGET_RPATH_ENV) "$(DRIVER_BINARY)" --sysroot $(SYSROOT) $(LIBSTD) test.rs -o "$(TMPDIR)/driver_test" > "$(TMPDIR)"/output.stdout
22 ifdef RUSTC_BLESS_TEST
23 cp "$(TMPDIR)"/output.stdout output.stdout
25 $(DIFF) output.stdout "$(TMPDIR)"/output.stdout