mirror of
https://github.com/pezkuwichain/revive.git
synced 2026-06-14 11:11:00 +00:00
7f81f37e0c
Pre-eliminary support for LLVM releases and resolc binary releases by streamlining the build process for all supported hosts platforms. - Introduce the revive-llvm-builder crate with the revive-llvm builder utilty. - Do not rely on the LLVM dependency in $PATH to decouple the system LLVM installation from the LLVM host dependency. - Fix the emscripten build by decoupling the host and native LLVM dependencies. Thus allowing a single LLVM emscripten release that can be used on any host platform. - An example Dockerfile building an alpine container with a fully statically linked resolc ELF binary. - Remove the Debian builder utilities and workflow.
32 lines
829 B
Rust
32 lines
829 B
Rust
//! Compiler cache variants.
|
|
|
|
/// The list compiler cache variants to be used as constants.
|
|
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
|
|
pub enum CcacheVariant {
|
|
/// Standard ccache.
|
|
Ccache,
|
|
/// Mozilla's sccache.
|
|
Sccache,
|
|
}
|
|
|
|
impl std::str::FromStr for CcacheVariant {
|
|
type Err = String;
|
|
|
|
fn from_str(value: &str) -> Result<Self, Self::Err> {
|
|
match value {
|
|
"ccache" => Ok(Self::Ccache),
|
|
"sccache" => Ok(Self::Sccache),
|
|
value => Err(format!("Unsupported ccache variant: `{}`", value)),
|
|
}
|
|
}
|
|
}
|
|
|
|
impl std::fmt::Display for CcacheVariant {
|
|
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
|
|
match self {
|
|
Self::Ccache => write!(f, "ccache"),
|
|
Self::Sccache => write!(f, "sccache"),
|
|
}
|
|
}
|
|
}
|