Ensure `[target]` rustflags are deterministically passed
authorAlex Crichton <alex@alexcrichton.com>
Tue, 16 Jan 2018 19:22:40 +0000 (11:22 -0800)
committerAlex Crichton <alex@alexcrichton.com>
Tue, 16 Jan 2018 19:23:49 +0000 (11:23 -0800)
commitc9803a44f4ae64c3e1fc4dfa3401d19eca91e233
treec837e9708e3eb80c089cd60a2c12b530e1f0dcf4
parent55b72dd197910afed517fb15b87b97748a57296a
Ensure `[target]` rustflags are deterministically passed

The usage of `HashMap` in the `Config` tables introduced some nondeterminism, so
reverse that with a sort right before we pass it down to rustc. One day we'll
probably want to sort by the position where these keys were defined, but for now
a blanket sort should do the trick.

Closes #4935
src/cargo/ops/cargo_rustc/context.rs
tests/rustflags.rs