link to readme in the build utils llvm error message more (#373)

Signed-off-by: xermicus <cyrill@parity.io>
This commit is contained in:
xermicus
2025-09-02 14:21:54 +02:00
committed by GitHub
parent 2f89c743ce
commit 13faedf08a
+5 -3
View File
@@ -6,6 +6,10 @@ pub const REVIVE_LLVM_HOST_PREFIX: &str = "LLVM_SYS_181_PREFIX";
/// The revive LLVM target dependency directory prefix environment variable.
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`.
///
/// 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)
.map(Into::<std::path::PathBuf>::into)
.unwrap_or_else(|| {
panic!(
"install LLVM using the revive-llvm builder and export {REVIVE_LLVM_HOST_PREFIX}",
)
panic!("install LLVM using the revive-llvm builder and export '{REVIVE_LLVM_HOST_PREFIX}'; see also: {REVIVE_LLVM_BUILDER_HELP_LINK}")
})
.join("bin")
.join(name)