mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-07 17:18:32 +03:00
f466a2fa8f7594d6895bb4263a662adc7ed26326
-L currently specifies paths to search for Rust crates
Building crates that use native libraries is difficult. When the
library is located somewhere unexpected there is no way
to tell rustc additional paths to look in.
If libclang is located at `.` then rustc is not going to
know that and linking will fail.
To get around that I often end up inserting
#[link_args = "-L."] native mod m { }
into other crates to get them to build.
Now you just `rustc -L .` and it builds.
This doesn't do any rpathing so it's still up to somebody else
to put the library somewhere it will be found or use LD_LIBRARY_PATH
This feature comes with a single, XFAILed test, because I could
not think of a way to test it. Odd.
This is a compiler and suite of associated libraries and documentation for the Rust programming language. See LICENSE.txt for terms of copyright and redistribution. See http://www.rust-lang.org for more information.
Languages
Rust
95.7%
Shell
1%
C
0.9%
JavaScript
0.6%
Python
0.4%
Other
1.1%