pub enum CompilerKind {
Clang,
AppleClang,
ClangCl,
Gcc,
Msvc,
Unknown,
}Expand description
Recognized C/C++ compiler family.
Variants§
Clang
LLVM Clang.
AppleClang
Apple-shipped Clang (Apple clang version …). Treated as
Clang-compatible for capability purposes; tracked separately
for diagnostics.
ClangCl
LLVM clang-cl: Clang’s cl.exe-compatible driver. Reports a
clang version … banner like Clang, but accepts the MSVC
command line (/std:c++17, /showIncludes, /Fo…), so it is
detected by the invoked name and drives the MSVC dialect.
Gcc
GNU GCC / g++.
Msvc
Microsoft Visual C++ (cl.exe). Detected so Cabin can
produce a clear unsupported-backend error; the GCC/Clang
command pipeline cannot be used with this compiler.
Unknown
Compiler whose --version output Cabin does not recognize.
Capability detection treats this conservatively.
Implementations§
Source§impl CompilerKind
impl CompilerKind
Sourcepub fn is_clang_like(self) -> bool
pub fn is_clang_like(self) -> bool
Whether this compiler is part of the Clang family. clang-cl
is Clang under the hood, so it shares Clang’s diagnostic and
response-file capabilities even though it speaks the MSVC
dialect.
Sourcepub fn supports_gcc_style_command_line(self) -> bool
pub fn supports_gcc_style_command_line(self) -> bool
Whether this compiler accepts the GCC-style command line
the current C++ backend emits (-O<n>, -std=c++NN,
-MMD -MF, -DNAME, -Idir, …). Note clang-cl is
excluded: it is Clang but parses the MSVC command line.
Sourcepub fn speaks_msvc_dialect(self) -> bool
pub fn speaks_msvc_dialect(self) -> bool
Whether this compiler drives the MSVC command-line dialect
(/std:…, /Fo…, /showIncludes, <name>.lib archives):
cl.exe and Clang’s cl-compatible clang-cl driver.
Trait Implementations§
Source§impl Clone for CompilerKind
impl Clone for CompilerKind
Source§fn clone(&self) -> CompilerKind
fn clone(&self) -> CompilerKind
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for CompilerKind
Source§impl Debug for CompilerKind
impl Debug for CompilerKind
Source§impl<'de> Deserialize<'de> for CompilerKind
impl<'de> Deserialize<'de> for CompilerKind
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Display for CompilerKind
impl Display for CompilerKind
impl Eq for CompilerKind
Source§impl Hash for CompilerKind
impl Hash for CompilerKind
Source§impl Ord for CompilerKind
impl Ord for CompilerKind
Source§fn cmp(&self, other: &CompilerKind) -> Ordering
fn cmp(&self, other: &CompilerKind) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for CompilerKind
impl PartialEq for CompilerKind
Source§fn eq(&self, other: &CompilerKind) -> bool
fn eq(&self, other: &CompilerKind) -> bool
self and other values to be equal, and is used by ==.Source§impl PartialOrd for CompilerKind
impl PartialOrd for CompilerKind
Source§impl Serialize for CompilerKind
impl Serialize for CompilerKind
impl StructuralPartialEq for CompilerKind
Auto Trait Implementations§
impl Freeze for CompilerKind
impl RefUnwindSafe for CompilerKind
impl Send for CompilerKind
impl Sync for CompilerKind
impl Unpin for CompilerKind
impl UnsafeUnpin for CompilerKind
impl UnwindSafe for CompilerKind
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.