This is version 2 of my proposal from here:
As suggested by Petr Hosek, I have modified my proposal to use
tablegen instead of Python. I have also expanded the proposal based on
the roundtable discussion we had during the LLVM dev-meeting.
The high level idea of the proposal is still to use ground truth files
1. Public header files - Public header files are always generated
based on the configuration of the target platform.
3. Wrappers for platforms like CUDA and LTO.
4. As an optional extension generate redirectors (redirectors are
explained in ⚙ D69020 Illustrate a redirector using the example of round function from math.h.)
This overall proposal is captured in this diagram:
I also have a patch on phabricator with some docs explaining this
proposal: ⚙ D69421 [libc] Header generation scheme.