Skip to content

Commit

Permalink
pyo3-build-config: Replace TargetInfo with target_lexicon::Triple
Browse files Browse the repository at this point in the history
Add a new public crate function `cross_compile_from_to()` using `Triple`
arguments instead of plain strings in `cross_compile()`.

The downsides:

1. Build times: A simple PyO3 extension module build time increased (on average)
   from 15.05s to 15.25s (+0.2s) because of the new target-lexicon dependency
   and its build script.

2. The public crate API function `cross_compile()` may become somewhat flaky
   because of the impedance mismatch between Cargo and `target-lexicon`
   target triple interpretations.
  • Loading branch information
ravenexp committed Mar 25, 2022
1 parent 29baf4d commit fe9c160
Show file tree
Hide file tree
Showing 3 changed files with 163 additions and 127 deletions.
4 changes: 4 additions & 0 deletions pyo3-build-config/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ edition = "2018"

[dependencies]
once_cell = "1"
target-lexicon = "0.12"

[build-dependencies]
target-lexicon = "0.12"

[features]
default = []
Expand Down
Loading

0 comments on commit fe9c160

Please # to comment.