@petrhosek Based on earlier discussions in the LLVM Embedded Working Group, clang-runtimes is currently specific to the bare-metal driver. There is a possibility of future refactoring to remove the dependency on clang-runtimes. To avoid blocking this change until the broader redesign to take place, I’ve introduced an interim solution that supports Target Triple–specific include paths in the bare-metal driver via a hard-coded patch.
There are currently two possible solutions — one involves adding the include paths through multilib.yaml, and the other implements them via hard coding.
- [Multilib] Extend the Multilib system to support an IncludeDirs field. by simpal01 · Pull Request #146651 · llvm/llvm-project · GitHub
- [Clang][Driver] Fix the missing Target-Triple-Level include path resolution in Baremetal Driver by simpal01 · Pull Request #165321 · llvm/llvm-project · GitHub
I don’t believe the first approach (adding include paths through multilib.yaml) should cause any issues, as long as the relevant fields in multilib.yaml and the associated logic in the LLVM code remain aligned.
Variants:
- Dir: aarch64-none-elf/aarch64a_exn_rtti_unaligned
IncludeDirs:
- aarch64-none-elf/aarch64a_exn_rtti_unaligned/include
- aarch64-none-elf/include
That said, I have also provided hard-coded patch to offer the upstream community an additional option for consideration.