Monthly LLVM libc meeting

Notes from today’s meeting:

  • Commit Policy
    • People seem in agreement that review being strongly recommended is fine
    • Jhuber: being able to push in an emergency is important
      • Michaelrj: fix forward can be good, but also can break things more, be careful with it
  • “Good first issue”
  • Fixed Point:
    • Support for fixed point arithmetic in libc · Issue #74560 · llvm/llvm-project · GitHub
    • Currently in the process of setting up support
    • Compiler support is spotty
    • Leonard Chan has been working on compiler-side support
      • Currently we are only supporting clang 18+ for fixed point, since that’s the only compiler we are sure will work
    • Using fixed points instead of soft floats gives significant performance improvements on Cortex M0s and other embedded targets
    • Fixed point support isn’t in the standard, it’s technically still just a proposal
      • The proposal hasn’t changed since 2006, so it’s likely to be stable
      • Clang and gcc have support currently
        • Gcc requires a recompile to use it
    • As far as we know, there’s currently no open-source libc that supports it right now, so we will be the first
      • Erikson has a toolchain that supports fixed point support, but their libc is proprietary
  • Update on dependencies, compile + linking options, and flags propagation
    • Cmake has been fragile
    • lntue has been working through the technical debt
    • Planning on removing all the generator expressions
    • There may be a few small patches, but there will have to be a big patch doing the main change
    • Planning to have a new file for compile options
      • Put the test options in there
  • Fuzztest
  • Freestanding
    • Currently can’t do LTO with a libc since the compiler doesn’t want to inline libc
    • Look into having specific builtin disabling flags on specific functions
    • Jhuber wants ffreestanding since that simplifies the GPU build
      • The whole GPU environment needs to be freestanding
    • Look into making the inliner recognize specific “-no-builtin” functions to avoid inlining them
    • Being able to LTO the entire application is an important feature
  • Jhuber: working on updating the GPU build
  • Future cmake design
    • Currently the cmake assumes we’re building for the host, in future we’d like to make cross compiling and emulator testing easier
    • Ideally we’d match how libc++ and compiler-rt do cross compiling so that we can all work well together
  • GSoC
    • Proposals are still open (possibly)
    • Need to set up your idea as a mentor, then get a participant to write up a proposal
    • Deadline for the proposals is end of February
      • LLVM had a soft deadline of February 5th
      • If we want to do it we need to do it as soon as possible.
    • Idea for proposal:
      • Float16 support
      • Work on GPU support?
  • C23 support
    • Stdbit is in progress
      • We have most of it done
    • There are internal customers asking for C23 support (since it’s not as available elsewhere)
  • Nick is working on some integration for Bionic (Android)
    • Currently working on continuous release
  • For emulation