In my experience I've had most success with building the static runtime libraries standalone, i.e. building each library one at a time by pointing cmake at the directory rather than using the integrated build in the top level llvm dir. In my case I do:
compiler-rt built-ins (limited support for sanitizers on a Cortex-M7)
libunwind
libcxxabi
libcxx
Any remaining components of compiler-rt.
There have been posts on llvm-dev about cross-compiling for Arm, hopefully others may be able to share their experiences as well.
Apologies not got a lot of time left today, have to leave the virtual office. Arm does have a recipe for building a LLVM toolchain (initially targeting cortex-m0), this is likely doing both more and less than you want, but it may be possible to get some ideas from it https://github.com/ARM-software/LLVM-embedded-toolchain-for-Arm/
Peter
________________________________________
From: llvm-dev <llvm-dev...@lists.llvm.org> on behalf of Anthony Merlino via llvm-dev <llvm...@lists.llvm.org>
Sent: 15 January 2021 17:51
To: llvm...@lists.llvm.org
Subject: [llvm-dev] Cross Compiling Runtime Libraries with Freestanding Toolchain
Hello everyone,
```
#!/bin/bash
mkdir build-arm
cd build-arm
Best,
Anthony
_______________________________________________
LLVM Developers mailing list
llvm...@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev