[llvm-dev] build llvm fails under win7 x64/VS2017 (original) (raw)

Dennis Luehring via llvm-dev llvm-dev at lists.llvm.org
Mon Sep 17 01:30:27 PDT 2018


my build environment:

Win7 x64 VStudio 2017 Community Edition 15.8.4 (latest) CMake 3.12.1 (x86) git 2.19.0 (latest, x64) Python 2.7.2 (x86)

my build steps:

open VS2017 x64 developer command prompt cd D:\projects\fun\jit_tests mkdir llvm cd llvm git clone https://github.com/llvm-mirror/llvm mkdir llvm-build cd llvm-build cmake -G "Visual Studio 15 2017 Win64" -DBUILD_SHARED_LIBS=ON -DLLVM_TARGETS_TO_BUILD=host -DLLVM_ENABLE_WARNINGS=OFF -DLLVM_INCLUDE_EXAMPLES=OFF -DLLVM_INCLUDE_TESTS=OFF -DLLVM_INCLUDE_DOCS=OFF ../llvm cmake --build .

produces these errors and warnings while building

CMake Warning at CMakeLists.txt:29 (message):   Visual Studio generators use the x86 host compiler by default, even for   64-bit targets.  This can result in linker instability and out of memory   errors.  To use the 64-bit host compiler, pass -Thost=x64 on the CMake   command line. ... CMake Warning (dev) at utils/benchmark/CMakeLists.txt:3 (project):   Policy CMP0048 is not set: project() command manages VERSION variables.   Run "cmake --help-policy CMP0048" for policy details.  Use the cmake_policy   command to set the policy and suppress this warning. -----> seems related to https://bugs.llvm.org/show_bug.cgi?id=38874 ... CMake Warning at utils/benchmark/CMakeLists.txt:234 (message):   Using std::regex with exceptions disabled is not fully supported

and later some linker errors

LINK : fatal error LNK1104: cannot open file '....\Debug\lib\LLVMDemangle.lib' [D:\projects\fun\jit_tests\llvm40\llvm40-build\lib\Support\LLVMSupport.vcxproj] ... LINK : fatal error LNK1104: cannot open file '......\lib\Debug\benchmark.lib' [D:\projects\fun\jit_tests\llvm40\llvm40-build\utils\benchmark\src\benchmark_main.vcxproj] ... LINK : fatal error LNK1104: cannot open file '....\Debug\lib\LLVMDemangle.lib' [D:\projects\fun\jit_tests\llvm40\llvm40-build\lib\Support\LLVMSupport.vcxproj] ... LINK : fatal error LNK1104: cannot open file '......\lib\Debug\benchmark.lib' [D:\projects\fun\jit_tests\llvm40\llvm40-build\utils\benchmark\src\benchmark_main.vcxproj]

i also tried to build LLVM 4 and 6 on a clean cloned version git checkout -b release_40 git checkout -b release_60

producing the very same warnings/errors and the build breaks

in the end i've got 1 lib and 2 dlls - not what i've expected :)

any ideas?



More information about the llvm-dev mailing list