Running Tool In VS2015

When building my tool against Clang 3.8.0 and running it in VS2013 it worked perfectly (once I started building the clang-headers project).

Along comes VS2015 and I have to upgrade to Clang 3.9.0 since the VS2015 headers now use an intrinsic that wasn’t supported prior to 3.9.0. This unexpectedly broke my tool and caused the tool to generate the following new warning:

warning : unknown argument ignored in clang-cl: ‘-resource-dir=C:\MyTool\Release..\lib\clang\3.9.0’

This warning seems odd to me, since the -resource-dir argument is added by Clang. Also, it references the parent directory of the directory that the clang-headers project copies necessary include files to.

As I have been experimenting with getting my tool to work again it has become evident that somewhere between 3.8.0 and 3.9.0 the directory where the clang-headers project copies header file to has been removed from the set of include directories for a tool (at least on Windows…). By adding -IC:\MyTool\Release..\lib\clang\3.9.0\include to my command line I have been able to get my tool to work again.

Does anyone know why Clang was changed so that this directory is no longer included by default? Also, is there some other fix that I am missing?

Looks like this broke in r266973. That was in April, and it passes -resource-dir= to clang without checking the driver syntax. We can accept it, though. We accept the non-equals suffixed spelling of the same flag already.

Hi Daniel,

Looks like you could work around it by building to a bin/
subdirectory, i.e. C:\MyTool\Release\bin instead of just
C:\MyTool\Release. That way the (presumably-buggy) -resource-dir will
at least point to the right path.

- Kim

BTW, it should be fixed in r281550.

So, that should eliminate the warning that I am seeing, right? It does nothing about having to add the -I option, am I correct?

No, it should remove the need to add -I for clang’s internal headers. Clang will look for its headers relative to the resource directory.

I don’t suppose that there is a chance of this making it into 3.9.1, is there?