[PATCH] Introduce the idea of a minimum libc version

Reid Kleckner rnk at google.com
Sun Feb 15 10:10:06 PST 2015


One alternative would be to have separate module metadata for versions of
musl, glibc, and msvcrt. We would test for library support by doing our
basic computation of library function availability by OS. This sort of
implicitly assumes that you are using a certain C library, but I think
that's OK. After we do that libcall availability calculation, we look for
libc version numbers in the module metadata and add more availability as
appropriate.

If we have a module on Windows that has some musl version that implies
availability of a wide range of math helpers, then marking them available
is probably the right thing to do.

If the module has both musl and glibc versions, assuming availability of
libcalls from both is probably reasonable behavior. Ditto with msvcrt.

WDYT?

I'd rather avoid encoding all this in the triple. If somehow the module
metadata gets lost, marking a libcall as unavailable isn't the end of the
world.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150215/3c81088a/attachment.html>


More information about the cfe-commits mailing list