diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2015-02-06 13:40:00 -0800 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2015-02-06 13:53:39 -0800 |
| commit | 48b6aef6605794a9da0d9254960a91bbea0a0737 (patch) | |
| tree | 93abc56a14ed15074ac2f0358a2fd4d38e402ad0 /src/libstd/sys/unix/stack_overflow.rs | |
| parent | 0b56e9b1cb2fc00d7d9bc044e2a78b8fb12f2f1b (diff) | |
| download | rust-48b6aef6605794a9da0d9254960a91bbea0a0737.tar.gz rust-48b6aef6605794a9da0d9254960a91bbea0a0737.zip | |
rustc: Don't fall back to -L if using --extern
The compiler would previously fall back to using `-L` and normal lookup paths if a `--extern` path was specified but it did not match (wrong architecture, for example). This commit removes this behavior and forces the hand of the crate loader to *always* use the `--extern` path if specified, no matter whether it is correct or not. This fixes a bug today where the compiler's own libraries are favored in cross compilation by accident. For example when a crate using the crates.io version of `log` was cross compiled, Cargo would compile `log` for the target architecture. When loading the macros, however, the compiler currently favors using the *host* architecture (for plugins), and because the `--extern log=...` pointed at an rlib for the target architecture, that lookup failed. The crate loader then fell back on `-L` paths to find the compiler-used `log` crate (the wrong one!) and then a compile failure happened because the logging macros are slightly different.
Diffstat (limited to 'src/libstd/sys/unix/stack_overflow.rs')
0 files changed, 0 insertions, 0 deletions
