diff options
| author | nils <48135649+Nilstrieb@users.noreply.github.com> | 2022-10-18 16:55:32 +0200 |
|---|---|---|
| committer | nils <48135649+Nilstrieb@users.noreply.github.com> | 2022-10-19 16:21:21 +0200 |
| commit | ccc54613c33208520ae030090a90d59c310c5624 (patch) | |
| tree | 16541130a517340e72f92835257328c77b5394a1 /compiler/rustc_session/src/utils.rs | |
| parent | d7dd01fe8b071602510eaac9f676acc0e3cf8e4a (diff) | |
| download | rust-ccc54613c33208520ae030090a90d59c310c5624.tar.gz rust-ccc54613c33208520ae030090a90d59c310c5624.zip | |
Get rid of native_library projection queries
They don't seem particularly useful as I don't expect native libraries to change frequently.
Diffstat (limited to 'compiler/rustc_session/src/utils.rs')
| -rw-r--r-- | compiler/rustc_session/src/utils.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/compiler/rustc_session/src/utils.rs b/compiler/rustc_session/src/utils.rs index 9a4f6f9f9ef..e65b6891e32 100644 --- a/compiler/rustc_session/src/utils.rs +++ b/compiler/rustc_session/src/utils.rs @@ -53,6 +53,17 @@ impl NativeLibKind { NativeLibKind::RawDylib | NativeLibKind::Unspecified | NativeLibKind::LinkArg => false, } } + + pub fn is_statically_included(&self) -> bool { + matches!(self, NativeLibKind::Static { .. }) + } + + pub fn is_dllimport(&self) -> bool { + matches!( + self, + NativeLibKind::Dylib { .. } | NativeLibKind::RawDylib | NativeLibKind::Unspecified + ) + } } #[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Encodable, Decodable)] |
