]> git.lizzy.rs Git - rust.git/commit
Make -Z gen-crate-map usable for I/O
authorAlex Crichton <alex@alexcrichton.com>
Tue, 12 Nov 2013 09:29:09 +0000 (01:29 -0800)
committerAlex Crichton <alex@alexcrichton.com>
Sat, 30 Nov 2013 02:36:14 +0000 (18:36 -0800)
commitc1e287af7788261bd50f47a166fbbd3493355a38
treed45b71b942fc8793a20338ba8406a2abe54a2d9f
parent6d6ccb75ff2240ed294fcf6aa57e96c72316954c
Make -Z gen-crate-map usable for I/O

In #10422, I didn't actually test to make sure that the '-Z gen-crate-map'
option was usable before I implemented it. The crate map was indeed generated
when '-Z gen-crate-map' was specified, but the I/O factory slot was empty
because of an extra check in trans about filling in that location.

This commit both fixes that location, and checks in a "fancy test" which does
lots of fun stuff. The test will use the rustc library to compile a rust crate,
and then compile a C program to link against that crate and run the C program.
To my knowledge this is the first test of its kind, so it's a little ad-hoc, but
it seems to get the job done. We could perhaps generalize running tests like
this, but for now I think it's fine to have this sort of functionality tucked
away in a test.
src/librustc/middle/trans/base.rs
src/test/run-make/bootstrap-from-c-with-uvio/Makefile [new file with mode: 0644]
src/test/run-make/bootstrap-from-c-with-uvio/lib.rs [new file with mode: 0644]
src/test/run-make/bootstrap-from-c-with-uvio/main.c [new file with mode: 0644]