[libc-commits] [libc] [libc][cmake] Unify unit and hermetic test rules into add_libc_test (PR #233512)

Pavel Labath via libc-commits libc-commits at lists.llvm.org
Tue Oct 20 02:29:43 PDT 2026


https://github.com/labath commented:

I can't say I understand everything the patch does, though the parts I do not understand appear to be just moved around. For the parts I *do* understand, I have two questions:
-  Could we reduce the amount of `if(TARGET)` checks? Particularly checks like `if(TARGET libc-tests)` seem completely superfluous as we create that target on the very first line of the cmake file.
- what is the advantage of moving the MPFR&MPC checks into the base add_libc_test function? It may make sense they are doing (or will be doing) something that can't be expressed via a wrapper, but that doesn't seem to be the case since add_libc_test pretty much just handles these two libraries and then forwards to the internal function. The advantage I see with the current setup (specialized wrappers) is that it scales better if we end up having more kinds of specialized tests in the future (we can handle that in the respective wrappers instead of putting everything in the base function).

https://github.com/llvm/llvm-project/pull/233512


More information about the libc-commits mailing list