[PATCH] D142660: [AIX] supporting -X options for llvm-ranlib in AIX OS

Stephen Peckham via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 26 09:23:00 PDT 2023


stephenpeckham accepted this revision.
stephenpeckham added a comment.
This revision is now accepted and ready to land.

I don't see any reason to check the OBJECT_MODE environment variable if the -X flag is used.  What would the error be:  "You specified a valid -X flag, but by the way, OBJECT_MODE is set to an invalid value"?

I think all the commands that examine XCOFF files (llvm-ar, lllvm-ranlib, llvm-readobj, llvm-objdump, llvm-nm, etc.) should recognize "32", "64", "32_64", and "any".  I don't think it's necessary to recognize "d64", even if AIX commands do.  In addition, I wouldn't bother recognizing an XCOFF file with the magic number for a discontinued 64-bit object.  That means that "32_64" and "any" have the same behavior.   If -X is specified and does not have one of the 4 specified values, a usage message should be printed.  If -X is not specified but OBJECT_MODE is in the environment, a message should be printed if the value is not one of the 4 specified values.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D142660/new/

https://reviews.llvm.org/D142660



More information about the cfe-commits mailing list