]> git.lizzy.rs Git - rust.git/commit
Add metadata from a tempdir instead of a build dir
authorAlex Crichton <alex@alexcrichton.com>
Mon, 30 Dec 2013 16:19:04 +0000 (08:19 -0800)
committerAlex Crichton <alex@alexcrichton.com>
Mon, 30 Dec 2013 16:21:41 +0000 (08:21 -0800)
commitfe300870807ccd364b2f40c42c2043833c1f0783
tree189697b5e0ee757503435fac786d36fc82fdfac2
parenta4f30bf0c001034b855e79b72676667deb6db463
Add metadata from a tempdir instead of a build dir

Right now if you have concurrent builds of two libraries in the same directory
(such as rustc's bootstrapping process), it's possible that two libraries will
stomp over each others' metadata, producing corrupt rlibs.

By placing the metadata file in a tempdir we're guranteed to not conflict with
ay other builds happening concurrently. Normally this isn't a problem because
output filenames are scoped to the name of the crate, but metadata is special in
that it has the same name across all crates.
src/librustc/back/link.rs