[PATCH] D134284: [AIX] change the clang tests with llvm-nm -Xany

James Henderson via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 20 07:49:21 PDT 2022


jhenderson added a subscriber: jasonliu.
jhenderson added a comment.

In D134284#3802793 <https://reviews.llvm.org/D134284#3802793>, @DiggerLin wrote:

> In D134284#3802791 <https://reviews.llvm.org/D134284#3802791>, @jhenderson wrote:
>
>> In D134284#3802766 <https://reviews.llvm.org/D134284#3802766>, @DiggerLin wrote:
>>
>>> In D134284#3802763 <https://reviews.llvm.org/D134284#3802763>, @jhenderson wrote:
>>>
>>>> Wouldn't it be better to change the lit config to specify the `OBJECT_MODE` environment variable on AIX?
>>>
>>> I have tried it before, I added the following in clang/test/lit.cfg.py
>>>
>>>   if 'system-aix' in config.available_features:
>>>        config.environment['OBJECT_MODE'] = 'any' 
>>>
>>> it will cause  clang some problem in some test cases. something like ,"clang-16: error: OBJECT_MODE setting any is not recognized and is not a valid setting"
>>
>> Not sure I entirely follow. If `OBJECT_MODE` isn't an environment variable that clang uses, surely it should ignore it? What clang tests throw this sort of error?
>
> for example: clang/test/Parser/parser_overflow.c
>
>   Input was:
>         1: clang-16: error: OBJECT_MODE setting any is not recognized and is not a valid setting

It looks to me like https://github.com/llvm/llvm-project/blob/b982ba2a6e0f11340b4e75d1d4eba9ff62a81df7/clang/lib/Driver/Driver.cpp#L554 should be modified to accept the OBJECT_MODE values you've implemented for llvm-nm and llvm-ar. Otherwise, you'll never be able to use the `any` and `32_64` values supported by those tools as full environment variables (as opposed to variables set for a single or limited set of commands) on a system where clang is also used.

I'm neither a clang nor an AIX developer though, so my opinion is based only on what I've been reviewing in the llvm tools so far. Pinging @daltenty who implemented the functionality (see D82476 <https://reviews.llvm.org/D82476>) and @hubert.reinterpretcast and @jasonliu who reviewed it.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D134284



More information about the cfe-commits mailing list