rust/compiler/rustc_session/src
Aaron Hill 605513a513
Don't sort a Vec before computing its DepTrackingHash
Previously, we sorted the vec prior to hashing, making the hash
independent of the original (command-line argument) order. However, the
original vec was still always kept in the original order, so we were
relying on the rest of the compiler always working with it in an
'order-independent' way.

This assumption was not being upheld by the `native_libraries` query -
the order of the entires in its result depends on the order of entries
in `Options.libs`. This lead to an 'unstable fingerprint' ICE when the
`-l` arguments were re-ordered.

This PR removes the sorting logic entirely. Re-ordering command-line
arguments (without adding/removing/changing any arguments) seems like a
really niche use case, and correctly optimizing for it would require
additional work. By always hashing arguments in their original order, we
can entirely avoid a cause of 'unstable fingerprint' errors.
2021-05-25 22:11:39 -05:00
..
cgu_reuse_tracker.rs Make Diagnostic::span_fatal unconditionally raise an error 2021-05-08 23:12:04 -04:00
code_stats.rs
config.rs Don't sort a Vec before computing its DepTrackingHash 2021-05-25 22:11:39 -05:00
filesearch.rs Adjust target search algorithm for rustlib path 2021-05-10 19:15:19 +03:00
lib.rs remove cfg(bootstrap) 2021-05-24 11:07:48 -04:00
options.rs Auto merge of #83129 - LeSeulArtichaut:thir-unsafeck, r=nikomatsakis 2021-05-13 10:49:29 +00:00
output.rs Collapse all uses of target.options.foo into target.foo 2020-11-08 17:29:13 +03:00
parse.rs Implement span quoting for proc-macros 2021-05-12 00:51:31 -04:00
search_paths.rs use strip_prefix over starts_with and manual slicing based on pattern length (clippy::manual_strip) 2020-09-17 10:13:16 +02:00
session.rs Auto merge of #83813 - cbeuw:remap-std, r=michaelwoerister 2021-05-12 11:05:56 +00:00
utils.rs Implement RFC 2951: Native link modifiers 2021-05-05 16:04:25 -07:00