Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pyo3-build-config: Make PYO3_CROSS_LIB_DIR optional #2241

Merged
merged 4 commits into from Apr 2, 2022

Commits on Apr 1, 2022

  1. pyo3-build-config: Make lib_dir optional in CrossCompileConfig

    Change the `CrossCompileConfig` structure definition and make
    the public `lib_dir` field optional to support more flexible
    cross-compilation configuration in the future.
    
    FIXME: This change breaks the public `pyo3-build-config` crate API.
    
    Update the sysconfigdata extraction functions to fall through
    when `lib_dir` field is not set.
    
    WIP: Add `unwrap()` stubs to the main cross compile switch.
    ravenexp committed Apr 1, 2022
    Configuration menu
    Copy the full SHA
    54ae025 View commit details
    Browse the repository at this point in the history
  2. pyo3-build-config: Try "default" cross-compilation

    Try to generalize `windows_hardcoded_cross_compile()`
    to all supported target platforms (when possible).
    Rename it to `default_cross_compile()` and add some unit tests.
    
    Rewrite `load_cross_compile_config()` to fall back to
    the default interpreter configuration when no other config
    information sources are available.
    ravenexp committed Apr 1, 2022
    Configuration menu
    Copy the full SHA
    328e7d6 View commit details
    Browse the repository at this point in the history
  3. pyo3-build-config: Create per-target cross config files

    Rename `$OUT_DIR/pyo3-cross-compile-config.txt` to
    `$OUT_DIR/<triple>/pyo3-build-config.txt` to exclude the possibility
    of using stale build configuration data when the build target changes.
    
    Use the presence of the corresponding build configuration file
    in the `pyo3-build-config` build script output directory
    to detect whether we are cross compiling or not.
    
    This patch enables cross compilation without using
    any of `PYO3_CROSS_*` env variables in many cases.
    ravenexp committed Apr 1, 2022
    Configuration menu
    Copy the full SHA
    ccda497 View commit details
    Browse the repository at this point in the history
  4. Update the user guide and add a ChangeLog entry

    Update Architecture.md to reflect the current cross compilation
    support state.
    ravenexp committed Apr 1, 2022
    Configuration menu
    Copy the full SHA
    2d2b9f5 View commit details
    Browse the repository at this point in the history