diff options
author | Aditya Vidyadhar Kamath <Aditya.Kamath1@ibm.com> | 2023-10-10 08:13:14 -0500 |
---|---|---|
committer | Eli Schwartz <eschwartz93@gmail.com> | 2023-10-31 19:18:17 -0400 |
commit | f4d19db25e3183833a5e2d77ef5ab40b9b523144 (patch) | |
tree | 0669d882c388e8a0a256402dc4b4519a37ec3a45 /mesonbuild/build.py | |
parent | ce691f8c98aeb72a246c4d6e9d60ed9ec88a6afd (diff) | |
download | meson-f4d19db25e3183833a5e2d77ef5ab40b9b523144.zip meson-f4d19db25e3183833a5e2d77ef5ab40b9b523144.tar.gz meson-f4d19db25e3183833a5e2d77ef5ab40b9b523144.tar.bz2 |
Use target.aix_so_archive to decide to archive shared library in AIX
Previously, AIX support was updated to archive shared libraries per AIX
platform conventions, which expect .a files that contain .so files. This
is usually correct, but an edge case occurs for loadable plugins, e.g.
what meson creates for `shared_module()`. A notable example is python
extensions (SciPy, for example).
These should *not* be archived, because the .so file itself needs to be
loaded as a plugin. For example, SciPy fails to import in the python
interpreter.
Handle this by differentiating between plugins and regular libraries,
and only archiving when safe to do so.
Fixes #12219
Diffstat (limited to 'mesonbuild/build.py')
-rw-r--r-- | mesonbuild/build.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/mesonbuild/build.py b/mesonbuild/build.py index 4fc409a..8ae5475 100644 --- a/mesonbuild/build.py +++ b/mesonbuild/build.py @@ -2171,6 +2171,9 @@ class SharedLibrary(BuildTarget): typename = 'shared library' + # Used by AIX to decide whether to archive shared library or not. + aix_so_archive = True + def __init__( self, name: str, @@ -2436,6 +2439,9 @@ class SharedModule(SharedLibrary): typename = 'shared module' + # Used by AIX to not archive shared library for dlopen mechanism + aix_so_archive = False + def __init__( self, name: str, |