Add initial support for multilibs in Baremetal toolchain.
authorHafiz Abid Qadeer <abidh@codesourcery.com>
Mon, 14 Dec 2020 19:11:51 +0000 (19:11 +0000)
committerHafiz Abid Qadeer <abidh@codesourcery.com>
Mon, 14 Dec 2020 20:49:45 +0000 (20:49 +0000)
commit670686ad8ecc80158a6ff87fff55e0ffa6fdff5d
tree198d3c5452d26f04e6280e4ed9dcf7223bcc54c6
parentd50d7c37a159802c89454a6c53c0ec2e7949d84a
Add initial support for multilibs in Baremetal toolchain.

This patch add support of riscv multilibs in the Baremetal toolchain. It is
a bit different to what is done in GNU.cpp as we are not iterating a
GNU sysroot to find the multilibs. This is intended for an llvm only
toolchain. We are not checking for the presence of any runtime bits to
enable a specific multilib.

I have structured the patch so that other targets for which
there is no multilibs support yet in Baremetal.cpp (e.g. arm-none-eabi)
will not be affected. Patch also allows some multilibs reuse.

Long term, I would like to go in the direction of data-driven specification of
multilib directories and flags.

Reviewed By: jroelofs

Differential Revision: https://reviews.llvm.org/D93138
clang/lib/Driver/ToolChains/BareMetal.cpp
clang/lib/Driver/ToolChains/BareMetal.h
clang/test/Driver/baremetal.cpp