On Jul 10, 2013, at 2:40 PM, Eli Bendersky <[email protected]> wrote: >> I'm not asking you to wrap the driver. I'm asking you to change clang's >> driver logic when targeting *-*-nacl to use the existing logic to suppress >> builtin treatment of functions. >> >> Oh, it turns out Clang does not currently support -fno-builtin-<FUNC> at >> all: >> http://llvm.org/bugs/show_bug.cgi?id=4941 > > What functions do you want to opt out of builtin treatment? All of them? > Just math functions? > > For starters, math functions. There aren't many libc math functions handled > there, BTW. When I was working on the original patch I dug through history - > a couple were added (pow and sqrt) I think, and sqrt was then backed off due > to some problems. Even with pow there are other constrains such as errno (the > builtin is not generated when we want errno, naturally, even without > -fno-builtins). Perhaps I can make the target hook more generic - controlling > all math libraries (the BIfoo ones, not BI__builtin_foo) instead of just pow?
I really don't want this to be an IR-gen target hook, but adding a cc1-level ability to disable builtin treatment for math functions makes sense to me, or you can just add frontend support for -fno-builtin-<FUNC>. John.
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
