[llvm] [llvm-ar][Object][COFF] Compute UseECMap in computeMemberData. (PR #85230)

Jacek Caban via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 15 11:30:50 PDT 2024


cjacek wrote:

I pushed a new version which uses a more restrictive condition for `UseECMap`. It now requires both any ARM64 and any EC object to be present (possibly just ARM64EC object, which meets those conditions, but may be separated ARM64 and AMD64 objects). This ensures that nothing changes with this patch for `llvm-ar` unless it's clear that EC is appropriate.

The new detection should be pretty accurate and I expect it to be good enough for `llvm-ar` (which has no way of specifying the target otherwise), but testing it further, there are some corner cases for which such auto-detection is not what we need. If we create an import library with `llvm-lib` which has no exports, it will contain only import descriptors. Those are of ARM64 type both for `-machine:arm64` and `-machine:arm64ec`, but only the latter should emit EC symbol map. `writeArchive` has not enough information to make the distinction, so I kept `IsEC` argument for callers that wish to specify it, but made it optional for cases like `llvm-ar` to use the detection code.

https://github.com/llvm/llvm-project/pull/85230


More information about the llvm-commits mailing list