Skip to content

Commit

Permalink
Link libpython for AIX target (#4073)
Browse files Browse the repository at this point in the history
  • Loading branch information
messense authored and davidhewitt committed Apr 16, 2024
1 parent e501377 commit 4e13c0e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions newsfragments/4073.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
fixes undefined symbol errors when building extension module on AIX by linking `libpython`
2 changes: 2 additions & 0 deletions pyo3-build-config/src/impl_.rs
Original file line number Diff line number Diff line change
Expand Up @@ -775,6 +775,8 @@ pub fn is_linking_libpython() -> bool {
/// Must be called from a PyO3 crate build script.
fn is_linking_libpython_for_target(target: &Triple) -> bool {
target.operating_system == OperatingSystem::Windows
// See https://github.com/PyO3/pyo3/issues/4068#issuecomment-2051159852
|| target.operating_system == OperatingSystem::Aix
|| target.environment == Environment::Android
|| target.environment == Environment::Androideabi
|| !is_extension_module()
Expand Down

0 comments on commit 4e13c0e

Please sign in to comment.