mirror of
https://github.com/pezkuwichain/revive.git
synced 2026-06-12 16:21:05 +00:00
link to readme in the build utils llvm error message more (#373)
Signed-off-by: xermicus <cyrill@parity.io>
This commit is contained in:
@@ -6,6 +6,10 @@ pub const REVIVE_LLVM_HOST_PREFIX: &str = "LLVM_SYS_181_PREFIX";
|
|||||||
/// The revive LLVM target dependency directory prefix environment variable.
|
/// The revive LLVM target dependency directory prefix environment variable.
|
||||||
pub const REVIVE_LLVM_TARGET_PREFIX: &str = "REVIVE_LLVM_TARGET_PREFIX";
|
pub const REVIVE_LLVM_TARGET_PREFIX: &str = "REVIVE_LLVM_TARGET_PREFIX";
|
||||||
|
|
||||||
|
/// The revive LLVM host tool help link.
|
||||||
|
pub const REVIVE_LLVM_BUILDER_HELP_LINK: &str =
|
||||||
|
"https://github.com/paritytech/revive?tab=readme-ov-file#building-from-source";
|
||||||
|
|
||||||
/// Constructs a path to the LLVM tool `name`.
|
/// Constructs a path to the LLVM tool `name`.
|
||||||
///
|
///
|
||||||
/// Respects the [`REVIVE_LLVM_HOST_PREFIX`] environment variable.
|
/// Respects the [`REVIVE_LLVM_HOST_PREFIX`] environment variable.
|
||||||
@@ -13,9 +17,7 @@ pub fn llvm_host_tool(name: &str) -> std::path::PathBuf {
|
|||||||
std::env::var_os(REVIVE_LLVM_HOST_PREFIX)
|
std::env::var_os(REVIVE_LLVM_HOST_PREFIX)
|
||||||
.map(Into::<std::path::PathBuf>::into)
|
.map(Into::<std::path::PathBuf>::into)
|
||||||
.unwrap_or_else(|| {
|
.unwrap_or_else(|| {
|
||||||
panic!(
|
panic!("install LLVM using the revive-llvm builder and export '{REVIVE_LLVM_HOST_PREFIX}'; see also: {REVIVE_LLVM_BUILDER_HELP_LINK}")
|
||||||
"install LLVM using the revive-llvm builder and export {REVIVE_LLVM_HOST_PREFIX}",
|
|
||||||
)
|
|
||||||
})
|
})
|
||||||
.join("bin")
|
.join("bin")
|
||||||
.join(name)
|
.join(name)
|
||||||
|
|||||||
Reference in New Issue
Block a user