cmake ../llvm -G Ninja \
-DCMAKE_BUILD_TYPE=<Debug|Release> \ # Select build type
-DLLVM_LIBC_FULL_BUILD=ON \ # We need the full libc
-DLLVM_LIBC_TARGET_OS=gpu \ # Build in GPU mode
-DLLVM_LIBC_GPU_ARCHITECTURES=all \ # Build all supported architectures
-DCMAKE_INSTALL_PREFIX=<PATH> \ # Where 'libcgpu.a' will live
$> ninja install
I’m not sure why that file is failing to compile. It should be using the system libraries. The output file should be somewhere like ./runtimes/runtimes-bins/libc/cpu_features/check_cpu_features.cpp. Can you compile that normally outside of CMake? It should just be using the clang just built but it’s possible that it can’t find the system headers normally.