diff options
| author | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2024-12-12 14:44:18 +0000 |
|---|---|---|
| committer | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2024-12-13 11:29:15 +0000 |
| commit | c99d4f0f517260d3bd3f734eab29169d3f0a7233 (patch) | |
| tree | 2b3ccc6af08794354163c59935999d5f5f51c65a | |
| parent | 37b47f9542d1b8ce478f655733182b310750a4bb (diff) | |
Make dependency_formats an FxIndexMap rather than a list of tuples
It is treated as a map already. This is using FxIndexMap rather than UnordMap because the latter doesn't provide an api to pick a single value iff all values are equal, which each_linked_rlib depends on.
| -rw-r--r-- | src/driver/jit.rs | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/driver/jit.rs b/src/driver/jit.rs index d68948966ea..4be4291021d 100644 --- a/src/driver/jit.rs +++ b/src/driver/jit.rs @@ -287,12 +287,7 @@ fn dep_symbol_lookup_fn( let mut dylib_paths = Vec::new(); - let data = &crate_info - .dependency_formats - .iter() - .find(|(crate_type, _data)| *crate_type == rustc_session::config::CrateType::Executable) - .unwrap() - .1; + let data = &crate_info.dependency_formats[&rustc_session::config::CrateType::Executable].1; // `used_crates` is in reverse postorder in terms of dependencies. Reverse the order here to // get a postorder which ensures that all dependencies of a dylib are loaded before the dylib // itself. This helps the dynamic linker to find dylibs not in the regular dynamic library |
