This is an archive of the discontinued LLVM Phabricator instance.

[arm] Add core definition for armv8l and armv7l
ClosedPublic

Authored by omjavaid on Nov 6 2019, 9:33 AM.

Details

Summary

This patch adds core definitions in lldb ArchSpecs for armv8l and armv7l cores. There is also fix where while merging target and paltform triple we were updating core and triple which results in new triple with unknown environment and vendor. This fixes issues where lldb has a triple created after parsing elf header and another from the platform and we should be using consolidated information from both sides.

On Linux systems running on armv8 we are returned armv8l in case we are running 32bit sysroot on 64bit kernel (l for little endian).

Similarly for armv8 hardware running 32bit kernel and 32bit sysroot we are returned armv7l. This is quite common when we run 32 bit arm using docker container.

Also clang return target triple=armv8l-unknown-linux-gnueabihf

Diff Detail

Event Timeline

omjavaid created this revision.Nov 6 2019, 9:33 AM
labath added a comment.Nov 7 2019, 1:03 AM

Everything except the CoreUpdated part LGTM. The CoreUpdated part could use another look from someone more familiar with what exactly that code was trying to achieve. And a test... I'd consider breaking that off into a separate patch.

lldb/packages/Python/lldbsuite/test/make/Makefile.rules
242

Whitespace issues? If the file uses spaces/tabs inconsistently, feel free to reformat in in a separate NFC patch.

omjavaid marked an inline comment as done.Nov 12 2019, 4:41 PM

I have updated the patch as suggested and will move out the triple fix and whitespace issue in separate patches. Committing remaining changes shortly.

This revision was not accepted when it landed; it landed in state Needs Review.Nov 12 2019, 4:44 PM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptNov 12 2019, 4:44 PM