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

Digger Lin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 3 14:05:05 PST 2023


DiggerLin marked an inline comment as done.
DiggerLin added a comment.

In D142660#4090174 <https://reviews.llvm.org/D142660#4090174>, @jhenderson wrote:

> I'm not sure I understand why the logic for llvm-ranlib seems to be significantly different to how the option is implemented for llvm-ar? Could you explain this, please?

For llvm-ranlib , if big_archive do not have any global symbol table, it generate global symbol based on the -X option. if there is any global symbol table(no matter 32-bit or 64-bit), it do not any thing. (but AIX '**ranlib -X32**' will continue to generated a 32-bit global symbol table even there are 64-bit global symbol table if there is not a 32-bit global symbol table, I will discuss with my team , whether do I need to implement some behavior as AIX 'ranlib`   )

For llvm-ar (and AIX 'ar'), the -X option only work on a object file in the command line which will be added replaced, deleted or moved,. The big archive may has the 64-bit object file and 32-bit object file. it will be generated the global symbol table for on the all the object files in the big archive(-X do not apply when generate the global symbol table). there maybe has 32-bit global symbol table and 64-bit global symbol table at the same time(aix 'ar' has the same behaviors)



================
Comment at: llvm/tools/llvm-ar/llvm-ar.cpp:80-81
+         << "  -U                    - Use actual timestamps and uids/gids\n"
+         << "  -X(32|64|32_64)       - Specific the bit_mode of golbal symbol "
+            "table generated (AIX OS only)\n";
 }
----------------
jhenderson wrote:
> According to the AIX ranlib docs, this -X option "Specifies the type of object file ranlib should examine." This doesn't really line up with the description you've used here.
yes. any suggestion on the description ?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D142660



More information about the llvm-commits mailing list