[all-commits] [llvm/llvm-project] f740bc: [AIX] supporting -X options for llvm-ranlib in AIX OS

diggerlin via All-commits all-commits at lists.llvm.org
Tue Aug 22 06:42:08 PDT 2023

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f740bcb3707a17ed4ccd52157089011a586cc2a6
  Author: zhijian <zhijian at ca.ibm.com>
  Date:   2023-08-22 (Tue, 22 Aug 2023)

  Changed paths:
    M clang/lib/Driver/OffloadBundler.cpp
    M clang/test/lit.cfg.py
    M clang/tools/clang-offload-packager/ClangOffloadPackager.cpp
    M llvm/include/llvm/Object/Archive.h
    M llvm/include/llvm/Object/ArchiveWriter.h
    M llvm/lib/ObjCopy/Archive.cpp
    M llvm/lib/ObjCopy/MachO/MachOObjcopy.cpp
    M llvm/lib/Object/Archive.cpp
    M llvm/lib/Object/ArchiveWriter.cpp
    M llvm/lib/Object/COFFImportFile.cpp
    M llvm/lib/ToolDrivers/llvm-lib/LibDriver.cpp
    A llvm/test/tools/llvm-ranlib/AIX-X-option-non-AIX.test
    A llvm/test/tools/llvm-ranlib/aix-X-option.test
    M llvm/tools/llvm-ar/llvm-ar.cpp
    M llvm/tools/llvm-libtool-darwin/llvm-libtool-darwin.cpp

  Log Message:
  [AIX] supporting -X options for llvm-ranlib in AIX OS


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 at 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:

    Processes only 32-bit object files
    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

More information about the All-commits mailing list