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

Digger Lin via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 25 10:10:39 PDT 2023


DiggerLin marked 2 inline comments as done.
DiggerLin added inline comments.


================
Comment at: llvm/tools/llvm-ar/llvm-ar.cpp:1442
+
+            // -X option in ranlib do not accept "any"
+            if (BitMode == BitModeTy::Unknown || BitMode == BitModeTy::Any)
----------------
jhenderson wrote:
> DiggerLin wrote:
> > jhenderson wrote:
> > > I know that AIX ranlib doesn't accept "any" whereas I believe AIX ar does. I wonder though what the benefit is of preventing llvm-ranlib from accepting "any"? Dropping that special case would simplify the code.
> > agree with you. but we discussed about whether to accept `any` in our internal , we decide to keep all the behavior  as AIX `ranlib`
> > we decide to keep all the behavior as AIX ranlib
> 
> We aren't in your internal company here. This is the open source community, therefore you need to be able to justify your decisions in the open source conversation. What reason is there to keep rejecting this in llvm-ranlib? Perhaps worth asking yourself is "if we could control it, why would we keep that behaviour in AIX ranlib?".
according to 
https://www.ibm.com/docs/en/aix/7.1?topic=ar-command

-X mode , there is `32`, `64`, `32_64`, `d64`, any mode

d64
Examines discontinued 64-bit XCOFF files (magic number == U803XTOCMAGIC).

we do not support `d64`in llvm(since it is discontinued), but we keep `any`  option in llvm-ar in case of we want to use llvm-ar to replace AIX `ar`  in some AIX shell script which has option `any` for ar (`any = 32_64 + d64`),  we do no want to modify the option from `any` to `32_64` for AIX shell script, so we keep the `any` option for llvm-ar.

for AIX `ranlib`, https://www.ibm.com/docs/en/aix/7.2?topic=r-ranlib-command . it only support 32,64,32_64, It do not support `d64`, so there is no `any` option for AIX `ranlib`, we do not need to add a additional `any` for llvm-ranlib 


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