<div>I was taking a crack at modifying Frontend/InitHeaderSearch.cpp to use the Windows registry to find the Visual Studio installation directory, but find that because of the /Za option used via cmake (disables Microsoft extensions - ANSI only), windows.h won't compile.</div>

<div> </div>
<div>As an experiment I took out the /Za option from the clang/CMakeLists.txt file, but recompiling revealed some compile errors in some string class.<br clear="all"></div>
<div></div>
<div>Any thoughts on either how to make this work, or whether I should even be trying to read the registry?</div>
<div> </div>
<div>Note that using the registry would solve the problem of not being able to see the environment variables when the tests are run.</div>
<div> </div>
<div>I suppose I could hack up my own declarations for the needed registry symbols, but that sounds bad.</div>
<div> </div>
<div>On a related note, should not InitHeaderSearch also be using the target triple information to determine which include path to use?  I've enclosed a patch that attempts to do it.  This would be important for cross-compiling, I gather.  It also has revised code for getting the Visual Studio include path from the environment, plus the disabled code for the registry stuff.</div>

<div> </div>
<div>-John</div>
<div><br>-- <br>John Thompson<br><a href="mailto:John.Thompson.JTSoftware@gmail.com">John.Thompson.JTSoftware@gmail.com</a><br><br></div>