[libc-commits] [PATCH] D143913: [libc][NFC] Make tuning macros start with LIBC_COPT_

Michael Jones via Phabricator via libc-commits libc-commits at lists.llvm.org
Mon Feb 13 10:42:59 PST 2023


michaelrj added a comment.

The flags for my pieces don't have cmake options because I didn't know how we were going to organize them at first.

For printf: 
Disable float, disable index mode, and disable write int are all independent flags. They can have simple options and I think they should default to off, off, and on respectively (so that we only disable write int). 
Index arr len is takes an int, but it's already got a default in printf_config.h so its cmake options should probably default to off.
Conv atlas is intended to let users completely replace the conversion logic, since it defines where the header file that includes all the headers that define the converters is. I'd say it probably shouldn't have a cmake option at all, since the cmake targets that define the header libraries for the conversions would also need to be changed. Basically, it's for people who are using their own build system and want to use their own conversions.

For scanf:
Disable float and index mode are the same as in printf.

For strtofloat:
Scoping those options seems like a good idea. They can similarly have simple options, although it might be good to have a warning pop up when disabling simple decimal conversion since that means there's no guarantee of correctness.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D143913/new/

https://reviews.llvm.org/D143913



More information about the libc-commits mailing list