diff options
| author | bors <bors@rust-lang.org> | 2022-10-22 05:08:51 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-10-22 05:08:51 +0000 |
| commit | 3022afe3d144ca6acd34da9846ab74fa51328fda (patch) | |
| tree | dfeb7f0905d61872c6b5fb08685671fbc225010a /compiler/rustc_session/src | |
| parent | eecde5850cade0c058dc12330081329b31a826c7 (diff) | |
| parent | ccc54613c33208520ae030090a90d59c310c5624 (diff) | |
| download | rust-3022afe3d144ca6acd34da9846ab74fa51328fda.tar.gz rust-3022afe3d144ca6acd34da9846ab74fa51328fda.zip | |
Auto merge of #103196 - Nilstrieb:no-meta-query, r=cjgillot
Get rid of native_library projection queries They don't seem particularly useful as I don't expect native libraries to change frequently. Maybe they do provide significant value of keeping incremental compilation green though, I'm not sure.
Diffstat (limited to 'compiler/rustc_session/src')
| -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)] |
