]> git.lizzy.rs Git - rust.git/commit
rustc: Use CStore, not a separate crate cache
authorAlex Crichton <alex@alexcrichton.com>
Mon, 7 Apr 2014 19:14:33 +0000 (12:14 -0700)
committerAlex Crichton <alex@alexcrichton.com>
Tue, 8 Apr 2014 07:03:11 +0000 (00:03 -0700)
commit31755e2452b280fe4038140012dcd19560b6f03d
tree495fe532ee42e95610701b9d2597cb8e48a47635
parentef37cfdeccbdf8151129d2d182a568d7310754c1
rustc: Use CStore, not a separate crate cache

This separate crate cache is one factor which is causing libstd to be loaded
twice during normal compilation. The crates loaded for syntax extensions have a
separate cache than the crates loaded for linking, so all crates are loaded once
per #[phase] they're tagged with.

This removes the cache and instead uses the CStore structure itself as the cache
for loaded crates. This should allow crates loaded during the syntax phase to be
shared with the crates loaded during the link phase.
src/librustc/metadata/creader.rs
src/librustc/metadata/cstore.rs