mirror of
https://github.com/pezkuwichain/revive.git
synced 2026-04-22 23:08:01 +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.
30 lines
757 B
Rust
30 lines
757 B
Rust
//! The PolkaVM LLVM target triples.
|
|
|
|
/// The list of target triples used as constants.
|
|
///
|
|
/// It must be in the lowercase.
|
|
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
|
|
pub enum TargetTriple {
|
|
/// The PolkaVM RISC-V target triple.
|
|
PolkaVM,
|
|
}
|
|
|
|
impl std::str::FromStr for TargetTriple {
|
|
type Err = String;
|
|
|
|
fn from_str(value: &str) -> Result<Self, Self::Err> {
|
|
match value {
|
|
"polkavm" => Ok(Self::PolkaVM),
|
|
value => Err(format!("Unsupported target triple: `{}`", value)),
|
|
}
|
|
}
|
|
}
|
|
|
|
impl std::fmt::Display for TargetTriple {
|
|
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
|
|
match self {
|
|
Self::PolkaVM => write!(f, "riscv64-unknown-elf"),
|
|
}
|
|
}
|
|
}
|