about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp
diff options
context:
space:
mode:
authorAaron Hill <aa1ronham@gmail.com>2021-05-25 19:43:02 -0500
committerAaron Hill <aa1ronham@gmail.com>2021-05-25 22:11:39 -0500
commit605513a513ebe9dfe4d0716c87196d99160981a8 (patch)
tree7a5e56ec6335e43bc0aec79e43df5794c639cce7 /compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp
parentff2c947c00f867b9f012e28ba88cecfbe556f904 (diff)
downloadrust-605513a513ebe9dfe4d0716c87196d99160981a8.tar.gz
rust-605513a513ebe9dfe4d0716c87196d99160981a8.zip
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.
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp')
0 files changed, 0 insertions, 0 deletions