I want to port Clang to a new OS. For this, I already prepared a “sysroot” directory that contains the platform specific libraries for linking (when using Clang as a compilation driver), e.g. libc, libm, crt*.o etc.
How can I tell the Clang build system to (only) consider/search for the files in this directory? How and where can I provide it? For gcc, this is the –with-build-sysroot build option, but I haven’t found anything similar for compiling clang.