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.
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
