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, Encodable, Decodable)]
14 pub enum NativeLibKind
{
15 /// Static library (e.g. `libfoo.a` on Linux or `foo.lib` on Windows/MSVC) included
16 /// when linking a final binary, but not when archiving an rlib.
18 /// Static library (e.g. `libfoo.a` on Linux or `foo.lib` on Windows/MSVC) included
19 /// when linking a final binary, but also included when archiving an rlib.
21 /// Dynamic library (e.g. `libfoo.so` on Linux)
22 /// or an import library corresponding to a dynamic library (e.g. `foo.lib` on Windows/MSVC).
24 /// Dynamic library (e.g. `foo.dll` on Windows) without a corresponding import library.
26 /// A macOS-specific kind of dynamic libraries.
28 /// The library kind wasn't specified, `Dylib` is currently used as a default.
32 rustc_data_structures
::impl_stable_hash_via_hash
!(NativeLibKind
);