<html>
    <head>
      <base href="https://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 --- - libclang fails to build in 64-bit mode using Visual Studio 2013" href="https://urldefense.proofpoint.com/v2/url?u=https-3A__llvm.org_bugs_show-5Fbug.cgi-3Fid-3D23727&d=AwMBaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=pF93YEPyB-J_PERP4DUZOJDzFVX5ZQ57vQk33wu0vio&m=ht_agrcst1FMmFiugjl41o4dv7Cx25RBk9VhwanQOFM&s=_GtUCaJZXWdFvGFXSKkTbZHfvGvRgpeML68J6-Kaw5s&e=">23727</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>libclang fails to build in 64-bit mode using Visual Studio 2013
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>Build scripts
          </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>cmake
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>vinay_sajip@yahoo.co.uk
          </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>libclang fails to build in 64-bit mode on Visual Studio 2013, though it builds
without errors in 32-bit mode. (Release configuration)

The reason is that the linker options and inputs for certain projects are wrong
in 64-bit mode. After a number of changes were made, libclang was successfully
built in 64-bit mode. Specifically, project-by-project, the changes made were
as follows:

clang-tblgen:
    Additional option /machine:x86 was specified in linker options (removed).
    In the linker input, the following hardcoded library paths were changed
from ..\..\..\..\Release\lib\FOO.lib to ..\..\..\..\x64\Release\FOO.lib:
        ..\..\..\..\Release\lib\LLVMSupport.lib
        ..\..\..\..\Release\lib\LLVMTableGen.lib

llvm-tblgen:
    Additional option /machine:x86 was specified in linker options (removed).
    In the linker input, the following hardcoded library paths were changed
from ..\..\..\..\Release\lib\FOO.lib to ..\..\..\..\x64\Release\FOO.lib:
        ..\..\..\..\Release\lib\LLVMSupport.lib
        ..\..\..\..\Release\lib\LLVMTableGen.lib

libclang:
    Additional option /machine:x86 was specified in linker options (removed).
    In the linker input, the following hardcoded library paths were changed
from ..\..\..\..\Release\lib\FOO.lib to ..\..\..\..\x64\Release\FOO.lib
        ..\..\..\..\Release\lib\clangAST.lib
        ..\..\..\..\Release\lib\clangBasic.lib
        ..\..\..\..\Release\lib\clangFrontend.lib
        ..\..\..\..\Release\lib\clangIndex.lib
        ..\..\..\..\Release\lib\clangLex.lib
        ..\..\..\..\Release\lib\clangSema.lib
        ..\..\..\..\Release\lib\clangTooling.lib
        ..\..\..\..\Release\lib\clangARCMigrate.lib
        ..\..\..\..\Release\lib\LLVMCore.lib
        ..\..\..\..\Release\lib\LLVMSupport.lib
        ..\..\..\..\Release\lib\clangFormat.lib
        ..\..\..\..\Release\lib\clangToolingCore.lib
        ..\..\..\..\Release\lib\clangASTMatchers.lib
        ..\..\..\..\Release\lib\clangDriver.lib
        ..\..\..\..\Release\lib\clangParse.lib
        ..\..\..\..\Release\lib\LLVMMCParser.lib
        ..\..\..\..\Release\lib\LLVMOption.lib
        ..\..\..\..\Release\lib\clangSerialization.lib
        ..\..\..\..\Release\lib\clangEdit.lib
        ..\..\..\..\Release\lib\LLVMBitReader.lib
        ..\..\..\..\Release\lib\clangStaticAnalyzerCheckers.lib
        ..\..\..\..\Release\lib\clangStaticAnalyzerCore.lib
        ..\..\..\..\Release\lib\clangRewrite.lib
        ..\..\..\..\Release\lib\clangAnalysis.lib
        ..\..\..\..\Release\lib\LLVMMC.lib

Possibly a parameterised directory is better, such as
$(SolutionDir)$(Platform)\$(Configuration)\ - however it would need to be
consistent across x86 and x64 to be maximally useful.</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>