From ccc54613c33208520ae030090a90d59c310c5624 Mon Sep 17 00:00:00 2001 From: nils <48135649+Nilstrieb@users.noreply.github.com> Date: Tue, 18 Oct 2022 16:55:32 +0200 Subject: Get rid of native_library projection queries They don't seem particularly useful as I don't expect native libraries to change frequently. --- compiler/rustc_session/src/utils.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'compiler/rustc_session') 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)] -- cgit 1.4.1-3-g733a5