]> git.lizzy.rs Git - rust.git/commitdiff
auto merge of #19941 : alexcrichton/rust/issue-19767, r=brson
authorbors <bors@rust-lang.org>
Tue, 30 Dec 2014 11:11:07 +0000 (11:11 +0000)
committerbors <bors@rust-lang.org>
Tue, 30 Dec 2014 11:11:07 +0000 (11:11 +0000)
This commit adds support for the compiler to distinguish between different forms
of lookup paths in the compiler itself. Issue #19767 has some background on this
topic, as well as some sample bugs which can occur if these lookup paths are not
separated.

This commits extends the existing command line flag `-L` with the same trailing
syntax as the `-l` flag. Each argument to `-L` can now have a trailing `:all`,
`:native`, `:crate`, or `:dependency`. This suffix indicates what form of lookup
path the compiler should add the argument to. The `dependency` lookup path is
used when looking up crate dependencies, the `crate` lookup path is used when
looking for immediate dependencies (`extern crate` statements), and the `native`
lookup path is used for probing for native libraries to insert into rlibs. Paths
with `all` are used for all of these purposes (the default).

The default compiler lookup path (the rustlib libdir) is by default added to all
of these paths. Additionally, the `RUST_PATH` lookup path is added to all of
these paths.

Closes #19767

1  2 
src/librustc/session/config.rs
src/librustc/session/mod.rs
src/librustc_driver/driver.rs
src/librustdoc/core.rs

Simple merge
Simple merge
Simple merge
Simple merge