Function rustc_codegen_ssa::back::link::emit_metadata[][src]

pub fn emit_metadata(
    sess: &Session,
    metadata: &[u8],
    tmpdir: &MaybeTempDir
) -> PathBuf
Expand description

We use a temp directory here to avoid races between concurrent rustc processes, such as builds in the same directory using the same filename for metadata while building an .rlib (stomping over one another), or writing an .rmeta into a directory being searched for extern crate (observing an incomplete file). The returned path is the temporary file containing the complete metadata.