Page MenuHomePhabricator

[docs][ARM] Improve How to Cross Compile Compiler-rt Builtins For Arm
ClosedPublic

Authored by peter.smith on Dec 14 2018, 9:25 AM.

Details

Summary

Some recent experience on llvm-dev pointed out some errors in the document such as:

  • Assumption of ninja without -GNinja
  • Use of --march rather than -march
  • Problems with host include files when a multiarch setup was used
  • Insufficient flags given to clang when acting as the assembler
  • Instructions on using the cmake cache file BaremetalARM.cmake were incomplete

There was also insufficient troubleshooting information for when a step went wrong. I've made an effort to improve the document a bit based on this experience. Main changes:

  • Fixed the problems described above
  • Added a troubleshooting section
  • Cleared up one "at time of writing" that is no longer a problem.

There are quite a few changes in the doc. I'm happy to break this up into smaller changes.

Diff Detail

Repository
rL LLVM

Event Timeline

peter.smith created this revision.Dec 14 2018, 9:25 AM
efriedma added inline comments.Dec 14 2018, 2:58 PM
docs/HowToCrossCompileBuiltinsOnArm.rst
227 ↗(On Diff #178240)

For "A" targets, we recommend putting compiler-rt into llvm/projects, but for "M" targets we recommend putting it into llvm/runtimes? That seems kind of confusing... if it's intentional, please call it out explicitly.

Thanks for the comments. I used projects as that was what was in the LLVM Getting Started guide. I do agree that it is confusing though. I've put a bit more text at the start about where to get compiler-rt source code and where to place it. I've also moved the Baremetal CMake cache to the end as it is different to the other two sections.

efriedma accepted this revision.Dec 17 2018, 11:31 AM

LGTM

(It should be possible to build baremetal compiler-rt without an existing sysroot in theory, since there is no libc to link against, but I wouldn't be surprised if it doesn't work in practice; we should look into simplifying it at some point.)

This revision is now accepted and ready to land.Dec 17 2018, 11:31 AM
This revision was automatically updated to reflect the committed changes.