add link to user guide to cross compile error message

This commit is contained in:
David Hewitt 2023-10-30 22:21:26 +00:00
parent aa6622bb1a
commit 852e4fea04
1 changed files with 7 additions and 3 deletions

View File

@ -1361,9 +1361,13 @@ fn default_cross_compile(cross_compile_config: &CrossCompileConfig) -> Result<In
let version = cross_compile_config
.version
.or_else(get_abi3_version)
.ok_or(
"PYO3_CROSS_PYTHON_VERSION or an abi3-py3* feature must be specified \
when cross-compiling and PYO3_CROSS_LIB_DIR is not set.",
.ok_or_else(||
format!(
"PYO3_CROSS_PYTHON_VERSION or an abi3-py3* feature must be specified \
when cross-compiling and PYO3_CROSS_LIB_DIR is not set.\n\
= help: see the PyO3 user guide for more information: https://pyo3.rs/v{}/building_and_distribution.html#cross-compiling",
env!("CARGO_PKG_VERSION")
)
)?;
let abi3 = is_abi3();