CMake Error at /Users/rob/Dev/llvm-project/libc/cmake/modules/LLVMLibCArchitectures.cmake:149 (message):
Unsupported libc target operating system apple
Call Stack (most recent call first):
/Users/rob/Dev/llvm-project/libc/CMakeLists.txt:62 (include)
I have an Intel MacBook running macOS 13.1.
Moments before I had successfully built it, using the same commands but without the “libc” in the list of runtimes. I tried adding the libc because I couldn’t compile a “helloworld”.
> ~/Dev/llvm-project/build/bin/clang main.c
main.c:1:10: fatal error: 'stdio.h' file not found
#include <stdio.h>
It’s supposed to be darwin not apple, so not sure why that’s gone wrong.
But building LLVM libc probably isn’t what you want. If you just want to compile code, you need to tell upstream Clang where the macOS SDK sysroot is (xcrun --show-sdk-path will show it) via -isysroot (or via the SDKROOT environment variable).