Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable compiler consumers to obtain mir::Body with Polonius facts. #86977

Merged
merged 7 commits into from
Aug 17, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions src/test/run-make-fulldeps/obtain-borrowck/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
include ../tools.mk

# This example shows how to implement a rustc driver that retrieves MIR bodies
# together with the borrow checker information.

# How to run this
# $ ./x.py test src/test/run-make/obtain-borrowck
vakaras marked this conversation as resolved.
Show resolved Hide resolved

DRIVER_BINARY := "$(TMPDIR)"/driver
SYSROOT := $(shell $(RUSTC) --print sysroot)

all:
$(RUSTC) driver.rs -o "$(DRIVER_BINARY)"
$(TARGET_RPATH_ENV) "$(DRIVER_BINARY)" --sysroot $(SYSROOT) test.rs -o "$(TMPDIR)/driver_test" > "$(TMPDIR)"/output.stdout

ifdef RUSTC_BLESS_TEST
cp "$(TMPDIR)"/output.stdout output.stdout
else
$(DIFF) output.stdout "$(TMPDIR)"/output.stdout
endif
25 changes: 0 additions & 25 deletions src/test/run-make/obtain-borrowck/Makefile

This file was deleted.