Skip to content

Commit

Permalink
build-config: Always pass abi3 flag to default_lib_name_windows()
Browse files Browse the repository at this point in the history
Hardcoding `false` here leads to an incorrect abi3 DLL name
when cross-compiling to Windows.
  • Loading branch information
ravenexp committed Sep 21, 2021
1 parent f771d16 commit c28f453
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pyo3-build-config/src/impl_.rs
Expand Up @@ -982,12 +982,14 @@ fn windows_hardcoded_cross_compile(
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 for Windows.")?;

let abi3 = is_abi3();

Ok(InterpreterConfig {
implementation: PythonImplementation::CPython,
version,
shared: true,
abi3: is_abi3(),
lib_name: Some(default_lib_name_windows(version, false, false)),
abi3,
lib_name: Some(default_lib_name_windows(version, abi3, false)),
lib_dir: cross_compile_config.lib_dir.to_str().map(String::from),
executable: None,
pointer_width: None,
Expand Down

0 comments on commit c28f453

Please sign in to comment.