1 //! Type definitions for learning about the dependency formats of all upstream
2 //! crates (rlibs/dylibs/oh my).
4 //! For all the gory details, see the provider of the `dependency_formats`
7 use rustc_session::config::CrateType;
9 /// A list of dependencies for a certain crate type.
11 /// The length of this vector is the same as the number of external crates used.
12 /// The value is None if the crate does not need to be linked (it was found
13 /// statically in another dylib), or Some(kind) if it needs to be linked as
14 /// `kind` (either static or dynamic).
15 pub type DependencyList = Vec<Linkage>;
17 /// A mapping of all required dependencies for a particular flavor of output.
19 /// This is local to the tcx, and is generally relevant to one session.
20 pub type Dependencies = Vec<(CrateType, DependencyList)>;
22 #[derive(Copy, Clone, PartialEq, Debug, HashStable, Encodable, Decodable)]