[PATCH] D142660: [AIX] llvm-ar doesn't accept -X options when acting as llvm-ranlib in AIX OS

Digger Lin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 26 13:04:58 PST 2023


DiggerLin created this revision.
DiggerLin added reviewers: jhenderson, daltenty, hubert.reinterpretcast, Esme.
Herald added a subscriber: hiraditya.
Herald added a project: All.
DiggerLin requested review of this revision.
Herald added subscribers: llvm-commits, MaskRay.
Herald added a project: LLVM.

llvm-ar is symlinked as llvm-ranlib and will act as ranlib when invoked in that mode. llvm-ar since compiler/llvm-project at 4f2cfbe <https://github.ibm.com/compiler/llvm-project/commit/4f2cfbe5314b064625b2c87bde6ce5c8d04004c5> 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

  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.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D142660

Files:
  llvm/include/llvm/Object/ArchiveWriter.h
  llvm/lib/Object/ArchiveWriter.cpp
  llvm/test/tools/llvm-ranlib/aix-X-option.test
  llvm/tools/llvm-ar/llvm-ar.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D142660.492548.patch
Type: text/x-patch
Size: 12017 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230126/76bf4332/attachment.bin>


More information about the llvm-commits mailing list