This is an archive of the discontinued LLVM Phabricator instance.

[compiler-rt] Normalize i?86 to i386 and armv* to arm for COMPILER_RT_DEFAULT_TARGET_ARCH
ClosedPublic

Authored by mstorsjo on Mar 8 2021, 4:57 AM.

Details

Summary

This corresponds to getArchNameForCompilerRTLib in clang; any
32 bit x86 architecture triple (except on android, but those
exceptions are already handled in compiler-rt on a different level)
get the compiler rt library names with i386; arm targets get either
"arm" or "armhf". (Mapping to "armhf" is handled in the toplevel
CMakeLists.txt.)

Diff Detail

Event Timeline

mstorsjo created this revision.Mar 8 2021, 4:57 AM
mstorsjo requested review of this revision.Mar 8 2021, 4:57 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 8 2021, 4:57 AM
Herald added a subscriber: Restricted Project. · View Herald Transcript

I think this is OK for Android.

The toplevel armhf mapping seems redundant now -- can it be removed? (https://github.com/llvm/llvm-project/blob/1200f85818d16e4f0a57c503e186df7a8ad92435/compiler-rt/CMakeLists.txt#L114)

Yep, I was planning to remove that one afterwards.

I suppose this wildcard is also redundant: https://github.com/llvm/llvm-project/blob/1200f85818d16e4f0a57c503e186df7a8ad92435/compiler-rt/cmake/base-config-ix.cmake#L171.

Not all of it, this patch only normalizes the 32 bit ones. I guess one could try to normalize amd64 into x86_64 too, but this would still need to be at least i386 + x86_64.

phosek accepted this revision.Mar 9 2021, 2:49 PM

LGTM

This revision is now accepted and ready to land.Mar 9 2021, 2:49 PM
MaskRay accepted this revision.Mar 9 2021, 2:51 PM