• A
    rustc: Never register syntax crates in CStore · 5367c32c
    Alex Crichton 提交于
    When linking, all crates in the local CStore are used to link the final product.
    With #[phase(syntax)], crates want to be omitted from this linkage phase, and
    this was achieved by dumping the entire CStore after loading crates. This causes
    crates like the standard library to get loaded twice. This loading process is a
    fairly expensive operation when dealing with decompressing metadata.
    
    This commit alters the loading process to never register syntax crates in
    CStore. Instead, only phase(link) crates ever make their way into the map of
    crates. The CrateLoader trait was altered to return everything in one method
    instead of having separate methods for finding information.
    5367c32c
creader.rs 14.2 KB