I'm compiling clang on Windows with Visual Studio, and wondering how to take this parenthetical comment from the "Getting Started" page (http://clang.llvm.org/get_started.html):
Alternatively, build the "clang" project for the compiler driver (note that the driver is currently broken on Windows), or the "ALL_BUILD" project to build everything, including tools.
In my build, I notice clang can't find the standard headers. Is that what's meant by the driver is currently broken?
Do I need to explicitly tell clang where to look (with -I), or is there a way to configure the include path so that clang.exe doesn't need explicit -I options?
For running just the front end, you can just execute clang-cc.exe. I don’t know how much of clang.exe works on Windows. A quick look (trying clang -c somefile.cpp) showed:
clang: error: unable to execute command: program not executable
clang: error: assembler command failed due to signal 1 (use -v to see invocation)
I only use the front end, clang-cc now.
I have a patch for having it find the Visual Studio headers via the environment, but apparently it’s still under discussion/review. I’ve enclosed it, though it’s probably a bit stale by now.
Otherwise, for now, I would use the -I option, or possibly the CPLUS_INCLUDE_PATH or C_INCLUDE_PATH variables.