about summary refs log tree commit diff
path: root/src/rustllvm/RustWrapper.cpp
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2014-09-07 19:06:28 +0000
committerbors <bors@rust-lang.org>2014-09-07 19:06:28 +0000
commit86730e43c0dd83f946deb88ccbdaaa49817b1136 (patch)
tree942ef73a79eb106b2d65ef5dcf4eaa233a06abd2 /src/rustllvm/RustWrapper.cpp
parentd7502ac2d6c64958be672991c33a1404ea5f040e (diff)
parente7a000e717b06d7010c872efb1ed395fe8d8857d (diff)
downloadrust-86730e43c0dd83f946deb88ccbdaaa49817b1136.tar.gz
rust-86730e43c0dd83f946deb88ccbdaaa49817b1136.zip
auto merge of #16904 : inrustwetrust/rust/link-path-order, r=alexcrichton
Issue can be reproduced by the following:
```
$ cat main.rs
fn main() {}
$ rustc -Z print-link-args -Lfoo -Lbar main.rs
```
Run the rustc command a few times and observe that the order of the '-L' 'foo' '-L' 'bar' options randomly changes.

Actually hit this issue in practice on Windows when specifying two -L directories to rustc, one with rust-sdl2 in it and one with the C SDL2.dll. Since Windows file systems aren't case-sensitive, gcc randomly attempted to link against the rust sdl2.dll instead of SDL2.dll if that -L directory happened to come first.

The randomness was due to addl_lib_search_paths being a HashSet. Changed it to a Vec instead which maintains the ordering.
Unsure how to test this though since it is random by nature; suggestions very welcome.
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions