diff options
| author | Aditya Vidyadhar Kamath <Aditya.Kamath1@ibm.com> | 2025-04-14 07:24:26 -0500 |
|---|---|---|
| committer | Jussi Pakkanen <jpakkane@gmail.com> | 2025-04-14 17:50:23 +0300 |
| commit | bb776a5fe13d60166488712a40b6f8bde7738e0e (patch) | |
| tree | 72c5683893d2704145df424e3ec5c766778d4ffc | |
| parent | a2d2d311a16207a1cd65fa18cd2c88ae749db9d8 (diff) | |
| download | meson-bb776a5fe13d60166488712a40b6f8bde7738e0e.tar.gz | |
Fix two shared objects in archive for AIX.
In AIX, when we use ar -q to archive then if there is a shared object already existing with the same name a duplicate one is created if one tries to archive again.
Meson archives shared library during build time and relinks again during install time. At this stage when shared object is again made and archived again, creating two shared objects in the archive.
When we use "ar -rs" then we ensure it is only one.
Reference: https://www.ibm.com/docs/en/aix/7.1?topic=ar-command
This patch is a fix to the same.
Before patch output:
rwxr-xr-x 0/0 5018 Apr 14 05:57 2025 libmylib.so
rwxr-xr-x 0/0 5018 Apr 14 05:58 2025 libmylib.so
After patch output:
rwxr-xr-x 0/0 5018 Apr 14 07:23 2025 libmylib.so
| -rw-r--r-- | mesonbuild/linkers/linkers.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mesonbuild/linkers/linkers.py b/mesonbuild/linkers/linkers.py index 0302ed7c6..e74ff708d 100644 --- a/mesonbuild/linkers/linkers.py +++ b/mesonbuild/linkers/linkers.py @@ -1556,7 +1556,7 @@ class AIXDynamicLinker(PosixDynamicLinkerMixin, DynamicLinker): def get_command_to_archive_shlib(self) -> T.List[str]: # Archive shared library object and remove the shared library object, # since it already exists in the archive. - command = ['ar', '-q', '-v', '$out', '$in', '&&', 'rm', '-f', '$in'] + command = ['ar', '-r', '-s', '-v', '$out', '$in', '&&', 'rm', '-f', '$in'] return command def get_link_whole_for(self, args: T.List[str]) -> T.List[str]: |
