diff options
author | zhijian <zhijian@ca.ibm.com> | 2023-08-22 09:41:33 -0400 |
---|---|---|
committer | zhijian <zhijian@ca.ibm.com> | 2023-08-22 09:41:33 -0400 |
commit | f740bcb3707a17ed4ccd52157089011a586cc2a6 (patch) | |
tree | 7cba4878fe27d78c0d1d96e5bb06eb3d7961ab39 /llvm/lib/Object/Archive.cpp | |
parent | 8f6a1a07cb85980013c70d5af6d28f5fcf75e732 (diff) | |
download | llvm-f740bcb3707a17ed4ccd52157089011a586cc2a6.zip llvm-f740bcb3707a17ed4ccd52157089011a586cc2a6.tar.gz llvm-f740bcb3707a17ed4ccd52157089011a586cc2a6.tar.bz2 |
[AIX] supporting -X options for llvm-ranlib in AIX OS
Summary:
llvm-ar is symlinked as llvm-ranlib and will act as ranlib when invoked in that mode. llvm-ar since [[ https://github.ibm.com/compiler/llvm-project/commit/4f2cfbe5314b064625b2c87bde6ce5c8d04004c5 | compiler/llvm-project@4f2cfbe ]] supports the -X options, but doesn't seem to accept them when running as llvm-ranlib.
In AIX OS , according to https://www.ibm.com/docs/en/aix/7.2?topic=r-ranlib-command
-X mode Specifies the type of object file ranlib should examine. The mode must be one of the following:
32
Processes only 32-bit object files
64
Processes only 64-bit object files
32_64, any
Processes both 32-bit and 64-bit object files
The default is to process 32-bit object files (ignore 64-bit objects). The mode can also be set with the OBJECT_MODE environment variable. For example, OBJECT_MODE=64 causes ranlib to process any 64-bit objects and ignore 32-bit objects. The -X flag overrides the OBJECT_MODE variable.
Reviewers: James Henderson, MaskRay, Stephen Peckham
Differential Revision: https://reviews.llvm.org/D142660
Diffstat (limited to 'llvm/lib/Object/Archive.cpp')
-rw-r--r-- | llvm/lib/Object/Archive.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/Object/Archive.cpp b/llvm/lib/Object/Archive.cpp index 9920145..bf9a1ce 100644 --- a/llvm/lib/Object/Archive.cpp +++ b/llvm/lib/Object/Archive.cpp @@ -1392,6 +1392,8 @@ BigArchive::BigArchive(MemoryBufferRef Source, Error &Err) GlobSymtab32Loc, GlobSymtab32Size, "32-bit"); if (Err) return; + + Has32BitGlobalSymtab = true; } if (GlobSymtab64Offset) { @@ -1400,6 +1402,8 @@ BigArchive::BigArchive(MemoryBufferRef Source, Error &Err) GlobSymtab64Loc, GlobSymtab64Size, "64-bit"); if (Err) return; + + Has64BitGlobalSymtab = true; } SmallVector<GlobalSymtabInfo> SymtabInfos; |