Help with librustc


I'm trying to get a librustc to compile some source to the point where I can get type information out.
gist here: attempt to use librustc · GitHub (I used the code in librustc/ as a starting point)

Unfortunately it only gets to the resolve::resolve_crate stage with the error:

'unresolved import `std::prelude::v1::*`'. Maybe a missing `extern crate std`?'

I'm not sure why it can't resolve the prelude, I've set the options.maybe_sysroot to "/usr/local" to match my rustc install. Not setting the maybe_sysroot results in another error: "can't find crate for std"

Any help would be much appreciated!



Stumbled upon this myself. The following call is missing:


It's described in phase_3_run_analysis_passes of librustc_driver/