Skip to content

Commit

Permalink
Raise target-lexicon version and update for API changes
Browse files Browse the repository at this point in the history
  • Loading branch information
alex committed Dec 23, 2024
1 parent ea8c461 commit 6dfe340
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions pyo3-build-config/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ rust-version = "1.63"
[dependencies]
once_cell = "1"
python3-dll-a = { version = "0.2.11", optional = true }
target-lexicon = "0.12.14"
target-lexicon = "0.13"

[build-dependencies]
python3-dll-a = { version = "0.2.11", optional = true }
target-lexicon = "0.12.14"
target-lexicon = "0.13"

[features]
default = []
Expand Down
4 changes: 2 additions & 2 deletions pyo3-build-config/src/impl_.rs
Original file line number Diff line number Diff line change
Expand Up @@ -938,8 +938,8 @@ impl CrossCompileConfig {
&& host.operating_system == OperatingSystem::Windows;

// Not cross-compiling to compile for x86-64 Python from macOS arm64 and vice versa
compatible |= target.operating_system == OperatingSystem::Darwin
&& host.operating_system == OperatingSystem::Darwin;
compatible |= matches!(target.operating_system, OperatingSystem::Darwin(_))
&& matches!(host.operating_system, OperatingSystem::Darwin(_));

!compatible
}
Expand Down
2 changes: 1 addition & 1 deletion pyo3-build-config/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ pub fn add_extension_module_link_args() {
}

fn _add_extension_module_link_args(triple: &Triple, mut writer: impl std::io::Write) {
if triple.operating_system == OperatingSystem::Darwin {
if matches!(triple.operating_system, OperatingSystem::Darwin(_)) {
writeln!(writer, "cargo:rustc-cdylib-link-arg=-undefined").unwrap();
writeln!(writer, "cargo:rustc-cdylib-link-arg=dynamic_lookup").unwrap();
} else if triple == &Triple::from_str("wasm32-unknown-emscripten").unwrap() {
Expand Down

0 comments on commit 6dfe340

Please sign in to comment.