rust/src/librustc_metadata
Alex Crichton 884715c654 rustc: Load the rustc_trans crate at runtime
Building on the work of # 45684 this commit updates the compiler to
unconditionally load the `rustc_trans` crate at runtime instead of linking to it
at compile time. The end goal of this work is to implement # 46819 where rustc
will have multiple backends available to it to load.

This commit starts off by removing the `extern crate rustc_trans` from the
driver. This involved moving some miscellaneous functionality into the
`TransCrate` trait and also required an implementation of how to locate and load
the trans backend. This ended up being a little tricky because the sysroot isn't
always the right location (for example `--sysroot` arguments) so some extra code
was added as well to probe a directory relative to the current dll (the
rustc_driver dll).

Rustbuild has been updated accordingly as well to have a separate compilation
invocation for the `rustc_trans` crate and assembly it accordingly into the
sysroot. Finally, the distribution logic for the `rustc` package was also
updated to slurp up the trans backends folder.

A number of assorted fallout changes were included here as well to ensure tests
pass and such, and they should all be commented inline.
2018-01-27 19:16:21 -08:00
..
astencode.rs incr.comp.: Hash spans unconditionally for full accuracy. 2017-12-08 10:02:26 +01:00
build.rs rustc: Add some build scripts for librustc crates 2017-07-22 22:04:13 -07:00
Cargo.toml Try to fix a perf regression by updating log 2018-01-07 16:54:05 +01:00
creader.rs Don't include DefIndex in plugin- and proc-macro registrar fn symbol. 2018-01-16 17:30:11 +01:00
cstore.rs CStore switch FxHashMap to IndexVec 2017-12-27 10:36:52 -05:00
cstore_impl.rs Remove impl Foo for .. in favor of auto trait Foo 2018-01-13 18:48:00 +03:00
decoder.rs Reexport -> re-export in prose and documentation comments 2018-01-15 13:36:53 -05:00
diagnostics.rs Clarify failure condition on tests 2017-09-05 11:55:01 -07:00
dynamic_lib.rs rustc: Load the rustc_trans crate at runtime 2018-01-27 19:16:21 -08:00
encoder.rs Remove impl Foo for .. in favor of auto trait Foo 2018-01-13 18:48:00 +03:00
index.rs Use different DefIndex representation that is better suited for variable length integer encodings. 2018-01-08 14:15:17 +01:00
index_builder.rs Replace uses of DepGraph.in_ignore with DepGraph.with_ignore 2018-01-09 18:35:50 +01:00
isolated_encoder.rs incr.comp.: Remove on-export crate metadata hashing. 2017-11-29 16:28:25 +01:00
lib.rs Use the new fs_read_write functions in rustc internals 2018-01-10 14:53:40 -08:00
link_args.rs rustc: Remove a number of mutable fields in cstore 2017-09-05 07:37:28 -07:00
locator.rs Use the new fs_read_write functions in rustc internals 2018-01-10 14:53:40 -08:00
native_libs.rs Avoid panicking when invalid argument is passed to cfg(..) 2018-01-12 21:48:17 +09:00
schema.rs Remove impl Foo for .. in favor of auto trait Foo 2018-01-13 18:48:00 +03:00