<html>
    <head>
      <base href="http://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - WindowsToolChain failed to find VS installation when compiled as 64-bit code"
   href="http://llvm.org/bugs/show_bug.cgi?id=17033">17033</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>WindowsToolChain failed to find VS installation when compiled as 64-bit code
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Windows NT
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Driver
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>mingxiang.xu@autodesk.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvmbugs@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>WindowsToolChain.cpp queries registry for VS installation. When compiled as
32-bit code, it looks at HKEY_LOCAL_MACHINE\SOTWARE\Microsoft\VisualStudio.
This works well.

If WindowsToolChain.cpp is compiled as 64-bit code, it fails to find VS
installation because the registry is actually stored in
HKEY_LOCAL_MACHINE\SOTWARE\Wow6432Node\Microsoft\VisualStudio. Visual Studio is
a 32-bit appliation.

It would be helpful to add KEY_WOW64_32KEY flag to RegOpenKeyEx or check
IsWow64Process() so that it can find the correct registry key in Wow6432Node.

Not for this bug, it would be nice to add VS110COMNTOOLS environemnt var check
as a fallback.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>