mirror of
https://github.com/fluencelabs/wasmer
synced 2024-12-12 22:05:33 +00:00
greatly simplify logic -- thanks Lachlan!
This commit is contained in:
parent
b3dacbfc3c
commit
e8b2660eb7
@ -105,22 +105,13 @@ enum Backend {
|
||||
|
||||
impl Backend {
|
||||
pub fn variants() -> &'static [&'static str] {
|
||||
#[cfg(all(feature = "backend:singlepass", feature = "backend:llvm"))]
|
||||
{
|
||||
&["cranelift", "singlepass", "llvm"]
|
||||
}
|
||||
#[cfg(all(not(feature = "backend:singlepass"), feature = "backend:llvm"))]
|
||||
{
|
||||
&["cranelift", "llvm"]
|
||||
}
|
||||
#[cfg(all(feature = "backend:singlepass", not(feature = "backend:llvm")))]
|
||||
{
|
||||
&["cranelift", "singlepass"]
|
||||
}
|
||||
#[cfg(all(not(feature = "backend:singlepass"), not(feature = "backend:llvm")))]
|
||||
{
|
||||
&["cranelift"]
|
||||
}
|
||||
&[
|
||||
"cranelift",
|
||||
#[cfg(feature = "backend:singlepass")]
|
||||
"singlepass",
|
||||
#[cfg(feature = "backend:llvm")]
|
||||
"llvm",
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user