<div dir="ltr"><p dir="ltr">I didn't think -resource-dir was a driver option, it's a -cc1 option. I'm not sure how to set it in the context of a clang tool, but there should be a way to get it through. Worst case you can use -Xclang.</p>
<p dir="ltr">Sent from phone</p>
<div class="gmail_quote">On Jul 12, 2016 5:48 PM, "Daniel Dilts via cfe-dev" <<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>I am uncertain on how to proceed with this.  immintrin.h (as provided by clang) is in the directory specified by -resource-dir.  In order for clang (and tools based on it) to handle the Windows header files, it must use these files or you get lots of errors parsing Microsoft's standard library implementation.</div><div><br></div><div>Since the -resource-dir flag doesn't appear to be valid anymore (but is still generated by clang), what is the method to cause clang to use the files in this directory?</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jun 30, 2016 at 11:05 AM, Daniel Dilts <span dir="ltr"><<a href="mailto:diltsman@gmail.com" target="_blank">diltsman@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>My command line roughly looks like this:</div><div>MyTool.exe D:\Source1.cpp D:\Source2.cpp -- --driver-mode=cl -Wno-c99-extensions -Wno-microsoft-enum-value -Wno-undefined-internal -fms-compatibility-version=19 -EHsc</div><div><br></div><div>My code to parse the command line arguments is this:</div><div>CommonOptionsParser optionsParser(argc, const_cast<const char**>(argv), gMyToolCategory);</div><div><br></div><div>The only places where the code mentions -resource-dir are in Clang or LLVM code.<br></div></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jun 30, 2016 at 8:42 AM, Hans Wennborg <span dir="ltr"><<a href="mailto:hans@chromium.org" target="_blank">hans@chromium.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span>On Wed, Jun 29, 2016 at 5:46 PM, Daniel Dilts <<a href="mailto:diltsman@gmail.com" target="_blank">diltsman@gmail.com</a>> wrote:<br>
> I am now building my tool against trunk.  I am seeing the following errors,<br>
> which I had a long time ago and I seem to remember that the tool had to know<br>
> about where the Clang build copied certain files.  Is there some other<br>
> project that needs to be built to make this work?  I have already set<br>
> clang-headers as a dependency.<br>
><br>
> CUSTOMBUILD : warning : unknown argument ignored in clang-cl:<br>
> '-resource-dir=D:\Some\Directory\lib\clang\3.9.0'<br>
<br>
</span>This looks like the problem. I don't know where this flag is coming<br>
from, but does it work better if you remove the '='?<br>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>
<br>_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a><br>
<br></blockquote></div>
</div>