https://llvm.org/bugs/show_bug.cgi?id=23727

            Bug ID: 23727
           Summary: libclang fails to build in 64-bit mode using Visual
                    Studio 2013
           Product: Build scripts
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: cmake
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    Classification: Unclassified

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.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to