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

David Tenty via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 20 08:42:05 PDT 2022


daltenty added a comment.

> 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.

Those settings don't really make sense for clang since you need to pick a single target and aren't typically supported for a compiler driver on AIX. For example the XL compiler would give you:

  error: 1501-255 OBJECT_MODE setting is not recognized and is not a valid setting for the compiler.

if you try `OBJECT_MODE=any`, so I don't think most folks are using such an environment setting on AIX currently (i.e. typically they select either 32 or 64).

I prefect the solution of adding something to the lit config rather than modifying individual tests, since I doubt most LLVM developers are not going to know to add -X any to their tests just for AIX. Ideally we’d find a way to get those tools to act in the AIX fashion, without placing the burden on developers to add options in their tests.

Maybe we can distinguish OBJECT_MODE settings for LLVM tools (which generally accept `any`) from a setting for the driver (which can't)? Something like a `TOOL_OBJECT_MODE` env which is preferred for the tools.


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