From 13faedf08a677c133bbd83ecc41be03fe49f4c87 Mon Sep 17 00:00:00 2001 From: xermicus Date: Tue, 2 Sep 2025 14:21:54 +0200 Subject: [PATCH] link to readme in the build utils llvm error message more (#373) Signed-off-by: xermicus --- crates/build-utils/src/lib.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/crates/build-utils/src/lib.rs b/crates/build-utils/src/lib.rs index 16a5843..fc30e0b 100644 --- a/crates/build-utils/src/lib.rs +++ b/crates/build-utils/src/lib.rs @@ -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::::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)