Skip to content

Commit 13faedf

Browse files
authored
link to readme in the build utils llvm error message more (#373)
Signed-off-by: xermicus <[email protected]>
1 parent 2f89c74 commit 13faedf

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

crates/build-utils/src/lib.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,18 @@ pub const REVIVE_LLVM_HOST_PREFIX: &str = "LLVM_SYS_181_PREFIX";
66
/// The revive LLVM target dependency directory prefix environment variable.
77
pub const REVIVE_LLVM_TARGET_PREFIX: &str = "REVIVE_LLVM_TARGET_PREFIX";
88

9+
/// The revive LLVM host tool help link.
10+
pub const REVIVE_LLVM_BUILDER_HELP_LINK: &str =
11+
"https://github.com/paritytech/revive?tab=readme-ov-file#building-from-source";
12+
913
/// Constructs a path to the LLVM tool `name`.
1014
///
1115
/// Respects the [`REVIVE_LLVM_HOST_PREFIX`] environment variable.
1216
pub fn llvm_host_tool(name: &str) -> std::path::PathBuf {
1317
std::env::var_os(REVIVE_LLVM_HOST_PREFIX)
1418
.map(Into::<std::path::PathBuf>::into)
1519
.unwrap_or_else(|| {
16-
panic!(
17-
"install LLVM using the revive-llvm builder and export {REVIVE_LLVM_HOST_PREFIX}",
18-
)
20+
panic!("install LLVM using the revive-llvm builder and export '{REVIVE_LLVM_HOST_PREFIX}'; see also: {REVIVE_LLVM_BUILDER_HELP_LINK}")
1921
})
2022
.join("bin")
2123
.join(name)

0 commit comments

Comments
 (0)