1 use crate::session::Session;
2 use rustc_data_structures::profiling::VerboseTimingGuard;
5 pub fn timer<'a>(&'a self, what: &'static str) -> VerboseTimingGuard<'a> {
6 self.prof.verbose_generic_activity(what)
8 pub fn time<R>(&self, what: &'static str, f: impl FnOnce() -> R) -> R {
9 self.prof.verbose_generic_activity(what).run(f)
13 #[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash, RustcEncodable, RustcDecodable)]
14 pub enum NativeLibraryKind {
15 /// native static library (.a archive)
17 /// native static library, which doesn't get bundled into .rlibs
21 /// Windows dynamic library without import library.
23 /// default way to specify a dynamic library
27 rustc_data_structures::impl_stable_hash_via_hash!(NativeLibraryKind);