diff --git a/CHANGELOG.md b/CHANGELOG.md index 41940debbc2..3425cf600f1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Update `num-complex` optional dependency to 0.4. [#1482](https://github.com/PyO3/pyo3/pull/1482) - Extend `hashbrown` optional dependency supported versions to include 0.11. [#1496](https://github.com/PyO3/pyo3/pull/1496) - Support PyPy 3.7. [#1538](https://github.com/PyO3/pyo3/pull/1538) +- Try harder to filter sysconfigdata candidates on arch.config ### Added - Add conversions for `[T; N]` for all `N` on Rust 1.51 and up. [#1128](https://github.com/PyO3/pyo3/pull/1128) diff --git a/build.rs b/build.rs index 01731aed9d5..49779b3e015 100644 --- a/build.rs +++ b/build.rs @@ -456,6 +456,24 @@ fn search_lib_dir(path: impl AsRef, cross: &CrossCompileConfig) -> Vec 1 { + let temp = sysconfig_paths + .iter() + .filter(|p| p.to_string_lossy().contains(&cross.arch)) + .map(|p| p.clone()) + .collect::>(); + if temp.len() > 0 { + sysconfig_paths = temp; + } + } + sysconfig_paths }