pub fn cross_compiling_from_to(
host: &Triple,
target: &Triple,
) -> Result<Option<CrossCompileConfig>>
Expand description
Detect whether we are cross compiling and return an assembled CrossCompileConfig if so.
This function relies on PyO3 cross-compiling environment variables:
PYO3_CROSS
: If present, forces PyO3 to configure as a cross-compilation.PYO3_CROSS_LIB_DIR
: If present, must be set to the directory containing the target’s libpython DSO and the associated_sysconfigdata*.py
file for Unix-like targets, or the Python DLL import libraries for the Windows target.PYO3_CROSS_PYTHON_VERSION
: Major and minor version (e.g. 3.9) of the target Python installation. This variable is only needed if PyO3 cannnot determine the version to target fromabi3-py3*
features, or if there are multiple versions of Python present inPYO3_CROSS_LIB_DIR
.
See the PyO3 User Guide for more info on cross-compiling.