Error: "This header is not available in freestanding mode." When compiling llvm 15.0.7

Hello. I am trying to compile llvm 15.0.7 from the llvm-project tar file. I am using arch

cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_PROJECTS=all -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang -DLLVM_POLLY_LINK_INTO_TOOLS=ON -DBUILD_SHARED_LIBS=ON -DLLVM_ENABLE_RTTI=ON -DLLVM_USE_LINKER=gold -DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache -DLLVM_TARGETS_TO_BUILD="X86;AMDGPU" -B build -S llvm

This runs successfully. When I cd build; make --jobs=4
I get the error

In file included from /home/ferris/builds/llvm-project-15.0.7.src/libc/src/math/generic/math_utils.cpp:9:
In file included from /home/ferris/builds/llvm-project-15.0.7.src/libc/src/math/generic/math_utils.h:16:
In file included from /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/13.2.1/../../../../include/c++/13.2.1/math.h:36:
In file included from /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/13.2.1/../../../../include/c++/13.2.1/cmath:41:
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/13.2.1/../../../../include/c++/13.2.1/bits/requires_hosted.h:34:4: error: "This header is not available in freestanding mode."
   34 | #  error "This header is not available in freestanding mode."
      |    ^
1 error generated.
make[2]: *** [projects/libc/src/math/generic/CMakeFiles/libc.src.math.generic.math_utils.dir/build.make:76: projects/libc/src/math/generic/CMakeFiles/libc.src.math.generic.math_utils.dir/math_utils.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:51210: projects/libc/src/math/generic/CMakeFiles/libc.src.math.generic.math_utils.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....

This is failing in the libc build. You should probably ask in the libc section. Alternatively, you can list all projects except libc in LLVM_ENABLE_PROJECTS if you just want to get past this.