Error in Windows build from release_40 branch

Hi,

I'm trying to do a build and install on Windows 10 with Visual Studio 2015 Community Edition for the X86 and ARM targets, from the current release_40 branch. While compilation completes without error, the INSTALL target fails with the following error:

54> CMake Error at projects/compiler-rt/lib/builtins/cmake_install.cmake:34 (file):
54> file INSTALL cannot find
54> "E:/Users/stm/Documents/GIT/llvm-build-4.0/$(Configuration)/lib/clang/4.0.0/lib/windows/clang_rt.builtins-x86_64.lib".
54> Call Stack (most recent call first):
54> projects/compiler-rt/lib/cmake_install.cmake:33 (include)
54> projects/compiler-rt/cmake_install.cmake:33 (include)
54> projects/cmake_install.cmake:32 (include)
54> cmake_install.cmake:57 (include)

I found a similar issue described in this thread:

http://lists.llvm.org/pipermail/llvm-dev/2014-March/070889.html

I'm assuming that I made a mistake, as otherwise others would have the problem too, but it is unclear to me what I could be doing wrong. I'm building from the Git mirror, with the following repository hierarchy:

llvm
llvm\projects\compiler-rt
llvm\tools\clang
llvm\tools\clang\tools\extra
llvm\tools\lld

I would be grateful for any hints, thanks!

Can you share how you ran "cmake" and then how you're building?

The mailing list thread you linked to talkes about
"multi-configuration generators", such as MSBuild. Have you tried
building with ninja (https://ninja-build.org/) instead?

Cheers,
Hans

Sure, this what I did (sorry, long protocol following):

1) Opened a Visual Studio 2015 Native Tools command prompt and launched cmake-gui.exe from there.

2) Configured "E:/Users/stm/Documents/GIT/llvm" as the source directory and "E:/Users/stm/Documents/GIT/llvm-build-4.0" as the build directory.

3) Clicked the "Configure" button.

4) Confirmed that the build directory should be created.

5) In the dialog box for the specifying the generator, left the defaults "Visual Studio 14 2015 Win64" and "Use default native compilers", clicked "Finish". This results in the following report in the output window:

Hans,

The mailing list thread you linked to talkes about
"multi-configuration generators", such as MSBuild. Have you tried
building with ninja (https://ninja-build.org/) instead?

I now tried the ninja build, and that was successful, so I have a workaround.

I still would like to know whether I made a mistake with the configuration of the Visual Studio build, because I would prefer to build from within Visual Studio.

Thanks,
Stephan

I don't think you made a mistake, I suppose something in the cmake
config is broken.

I don't think you made a mistake, I suppose something in the cmake
config is broken.

Hi Hans,
I can still see the MSVS install error as below with latest LLVM code. Is there any word around can let me install the LLVM through MSVS successfully?

  CMake Error at projects/compiler-rt/lib/builtins/cmake_install.cmake:37 (file):
    file INSTALL cannot find
    "D:/Project/LLVM/vs2015build/$(Configuration)/lib/clang/7.0.0/lib/windows/clang_rt.builtins-x86_64.lib".
  Call Stack (most recent call first):
    projects/compiler-rt/lib/cmake_install.cmake:38 (include)
    projects/compiler-rt/cmake_install.cmake:38 (include)
    projects/cmake_install.cmake:37 (include)
    cmake_install.cmake:72 (include)

Steven