zhijian adc317d369 llvm-nm ignore the Import symbol file for the --export-symbol option.
Summary:

On AIX OS, clang may use llvm-nm to export the symbols from all input files (see 515c435e37/clang/lib/Driver/ToolChains/AIX.cpp (L236)). However, the clang command-line may include import files (identified by them starting with #!). llvm-nm previously reported "invalid object file" errors for import files, meaning that the clang driver would fail to link when import files are included this way.

In this patch, llvm-nm is changed to ignore import files when the --export-symbol option, meaning that clang will now succeed in this case.

For more information about AIX import files, see https://www.ibm.com/docs/en/aix/7.3?topic=l-ld-command

Reviewers: Hubert Tong, James Henderson, MaskRay, Stephen Peckham
Differential Revision: https://reviews.llvm.org/D158004
2023-08-30 15:45:37 -04:00
..