This is an archive of the discontinued LLVM Phabricator instance.

[compiler-rt][Android] Use correct builtins library name for tests
ClosedPublic

Authored by rprichard on Jun 18 2020, 11:55 PM.

Details

Summary

The builtins library name is special on Android:

  • There is an "-android" suffix.
  • For the compiler-rt i386 architecture, Android targets i686 (in the triple and in the builtins library filename)

With this change, check-builtins works with Android.

Diff Detail

Event Timeline

rprichard created this revision.Jun 18 2020, 11:55 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 18 2020, 11:56 PM
Herald added subscribers: Restricted Project, dberris. · View Herald Transcript

FWIW, to run check-builtins, I followed the instructions at https://llvm.org/docs/HowToCrossCompileBuiltinsOnArm.html, but adjusted them to use the NDK to build compiler-rt. Each test is a simple dynamic executable built with something like -nodefaultlibs -lc -lm, and I set -DCOMPILER_RT_EMULATOR to a script I have that runs a program using adb push and adb shell.

To run the tests on arm32, I also needed to make this change, D82147. Some of the floating-point tests also failed, and were fixed by my other 80-bit FP revisions.

rprichard retitled this revision from [compiler-rt][Android] Make check-builtins work on Android to [compiler-rt][Android] Use correct builtins library name for tests.Jun 19 2020, 6:19 PM
rprichard edited the summary of this revision. (Show Details)
compnerd accepted this revision.Jun 30 2020, 8:47 AM
This revision is now accepted and ready to land.Jun 30 2020, 8:47 AM
This revision was automatically updated to reflect the committed changes.