]> git.lizzy.rs Git - rust.git/commit
Properly canonicalize crate paths specified via --extern
authorBjörn Steinbrink <bsteinbr@gmail.com>
Thu, 14 Aug 2014 21:42:37 +0000 (23:42 +0200)
committerBjörn Steinbrink <bsteinbr@gmail.com>
Fri, 15 Aug 2014 12:40:09 +0000 (14:40 +0200)
commita5590b3c752f5a7039c8786081c9d6a80267bdd0
treee81e947a26b0b954aa7e7ddcbe114d6e6580ca6d
parenta8c8e3f80fd0355b2bb91337c6ad0bb0a38d5485
Properly canonicalize crate paths specified via --extern

Crates that are resolved normally have their path canonicalized and all
symlinks resolved. This does currently not happen for paths specified
using the --extern option to rustc, which can lead to rustc thinking
that it encountered two different versions of a crate, when it's
actually the same version found through different paths.

To fix this, we must store the canonical path for crates found via
--extern and also use the canonical path when comparing paths.

Fixes #16496
src/librustc/metadata/creader.rs
src/librustc/metadata/loader.rs
src/test/run-make/symlinked-extern/Makefile [new file with mode: 0644]
src/test/run-make/symlinked-extern/bar.rs [new file with mode: 0644]
src/test/run-make/symlinked-extern/baz.rs [new file with mode: 0644]
src/test/run-make/symlinked-extern/foo.rs [new file with mode: 0644]