diff options
| author | Aditya Kamath <118170220+KamathForAIX@users.noreply.github.com> | 2023-06-28 00:32:32 +0530 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-06-27 22:02:32 +0300 |
| commit | 8946bc05f7f9cdd16dce3613c481a66f7835fc7f (patch) | |
| tree | ca5b43bcab5a14d45f317cae2a15fd8426aec60f /mesonbuild/minstall.py | |
| parent | 78b8d447eea08445c9708bc0e3ba3c886717f6cd (diff) | |
| download | meson-8946bc05f7f9cdd16dce3613c481a66f7835fc7f.tar.gz | |
Archive shared library in AIX (#11850)
* Archive shared library in AIX
This code change to ensure we archive shared libraries in AIX.
The things we do are:
Archive shared library
Install archived shared library
Build all must build the archived shared library
blibpath must have the archived shared library dependency.
* Archive shared library in AIX.
Made changes as per the review comments given in the first
PR request.
They are:-
Use self.environment.machines[t.for_machine].is_aix()
Remove trial spaces
Use of val instead of internal
Changed comments wherever requested
* Space after octothorpe
* Fixed failed test case causing build break during install section
* Moved AIX specific code to AIXDynamicLinker from backend
* Fix indentation, trailing spaces, add type annotations and Linux/macOS build break
* Remove some more trailing space issues
* Fixed the wrong return type in linkers
Diffstat (limited to 'mesonbuild/minstall.py')
| -rw-r--r-- | mesonbuild/minstall.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/mesonbuild/minstall.py b/mesonbuild/minstall.py index ec01fe729..49006917e 100644 --- a/mesonbuild/minstall.py +++ b/mesonbuild/minstall.py @@ -23,11 +23,12 @@ import shutil import subprocess import sys import typing as T +import re from . import build, coredata, environment from .backend.backends import InstallData from .mesonlib import (MesonException, Popen_safe, RealPathAction, is_windows, - setup_vsenv, pickle_load, is_osx, OptionKey) + is_aix, setup_vsenv, pickle_load, is_osx, OptionKey) from .scripts import depfixer, destdir_join from .scripts.meson_exe import run_exe try: @@ -709,6 +710,12 @@ class Installer: def install_targets(self, d: InstallData, dm: DirMaker, destdir: str, fullprefix: str) -> None: for t in d.targets: + # In AIX, we archive our shared libraries. When we install any package in AIX we need to + # install the archive in which the shared library exists. The below code does the same. + # We change the .so files having lt_version or so_version to archive file install. + if is_aix(): + if '.so' in t.fname: + t.fname = re.sub('[.][a]([.]?([0-9]+))*([.]?([a-z]+))*', '.a', t.fname.replace('.so', '.a')) if not self.should_install(t): continue if not os.path.exists(t.fname): |
