[libc-commits] [libc] [libc] avoid c++ includes from MPFR (PR #87693)

Nick Desaulniers via libc-commits libc-commits at lists.llvm.org
Thu Apr 4 13:32:40 PDT 2024


nickdesaulniers wrote:

> In full build mode, the fuzzing tests fail to build.

In full build mode, if anything EVER pulls in system headers other than strictly kernel headers:
1. stop
2. do not pass go
3. [do not collect $200](https://en.wiktionary.org/wiki/do_not_pass_go,_do_not_collect_$200)

I'm beginning to think that, slightly orthogonal to the refactoring of headers (#87598, #87017), we would be better served by REQUIRING a `--sysroot` for full build mode (especially for the tests). Maybe there's a way to simplify construction of the sysroot to minimize changes to buildbots (or have a default implicit one, but use `--sysroot` no matter what), but if we plan to include things like the compiler resource headers, which frequently use `#include_next`, we should really be using a sysroot in order to have strong guarantees that system headers (other than kernel headers) don't get included.  A sysroot is a hermetic way to do so that further simplifies cross compiling.

But if fuzzing NEEDS MPFR to compare results, then perhaps we don't allow fuzzing in full build mode. Or in full build mode, we don't invoke/use MPFR?

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


More information about the libc-commits mailing list