Building Windows Installer fo clang

Hi

Could you tell me how to build Windows Installer for clang

Regards.
Masaru.

Hi

I’m able to create a package by Ninja.

set DIR=%~dp0

cd /d %DIR%
rmdir /s /q llvm
svn co http://llvm.org/svn/llvm-project/llvm/trunk llvm

cd /d %DIR%
cd llvm\tools
svn co http://llvm.org/svn/llvm-project/cfe/trunk clang

cd /d %DIR%
cd llvm\tools
svn co http://llvm.org/svn/llvm-project/lld/trunk lld

cd /d %DIR%
cd llvm\tools
svn co http://llvm.org/svn/llvm-project/polly/trunk polly

cd /d %DIR%
cd llvm\projects
svn co http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt

cd /d %DIR%
cd llvm\projects
svn co http://llvm.org/svn/llvm-project/libcxx/trunk libcxx
svn co http://llvm.org/svn/llvm-project/libcxxabi/trunk libcxxabi

call “C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat” x86

rmdir /s /q build-ninja-llvm
mkdir build-ninja-llvm
cd build-ninja-llvm
cmake ^
-G Ninja ^
-D CMAKE_INSTALL_PREFIX=c:\clang ^
-D CMAKE_BUILD_TYPE=Release ^
…\llvm

ninja package

But I coundn’t create a package by Visual Studio 2017

cd build2017-llvm
cmake ^
-G “Visual Studio 15 2017” ^
-D CMAKE_INSTALL_PREFIX=c:\clang ^
…\llvm

open LLVM.sln and build PACKAGE.

Then I got the following errors.
It seems $(Configuration) is not expanded to Release.

71>------ ビルド開始: プロジェクト: PACKAGE, 構成: Release Win32 ------
71>CPack: Create package using NSIS
71>CPack: Install projects
71>CPack: - Install project: LLVM
71>CMake Error at C:/svnwork/build2017-llvm/projects/compiler-rt/lib/builtins/cmake_install.cmake:34 (file):
71> file INSTALL cannot find
71> “C:/svnwork/build2017-llvm/$(Configuration)/lib/clang/5.0.0/lib/windows/clang_rt.builtins-i386.lib”.
71>Call Stack (most recent call first):
71> C:/svnwork/build2017-llvm/projects/compiler-rt/lib/cmake_install.cmake:33 (include)
71> C:/svnwork/build2017-llvm/projects/compiler-rt/cmake_install.cmake:33 (include)
71> C:/svnwork/build2017-llvm/projects/cmake_install.cmake:32 (include)
71> C:/svnwork/build2017-llvm/cmake_install.cmake:65 (include)
71>
71>
71>CMake Error at C:/svnwork/build2017-llvm/projects/compiler-rt/lib/stats/cmake_install.cmake:34 (file):
71> file INSTALL cannot find
71> “C:/svnwork/build2017-llvm/$(Configuration)/lib/clang/5.0.0/lib/windows/clang_rt.stats-i386.lib”.
71>Call Stack (most recent call first):
71> C:/svnwork/build2017-llvm/projects/compiler-rt/lib/cmake_install.cmake:35 (include)
71> C:/svnwork/build2017-llvm/projects/compiler-rt/cmake_install.cmake:33 (include)
71> C:/svnwork/build2017-llvm/projects/cmake_install.cmake:32 (include)
71> C:/svnwork/build2017-llvm/cmake_install.cmake:65 (include)
71>
71>
71>CMake Error at C:/svnwork/build2017-llvm/projects/compiler-rt/lib/stats/cmake_install.cmake:46 (file):
71> file INSTALL cannot find
71> “C:/svnwork/build2017-llvm/$(Configuration)/lib/clang/5.0.0/lib/windows/clang_rt.stats_client-i386.lib”.
71>Call Stack (most recent call first):
71> C:/svnwork/build2017-llvm/projects/compiler-rt/lib/cmake_install.cmake:35 (include)
71> C:/svnwork/build2017-llvm/projects/compiler-rt/cmake_install.cmake:33 (include)
71> C:/svnwork/build2017-llvm/projects/cmake_install.cmake:32 (include)
71> C:/svnwork/build2017-llvm/cmake_install.cmake:65 (include)
71>
71>
71>CMake Error at C:/svnwork/build2017-llvm/projects/compiler-rt/lib/ubsan/cmake_install.cmake:34 (file):
71> file INSTALL cannot find
71> “C:/svnwork/build2017-llvm/$(Configuration)/lib/clang/5.0.0/lib/windows/clang_rt.ubsan_standalone-i386.lib”.
71>Call Stack (most recent call first):
71> C:/svnwork/build2017-llvm/projects/compiler-rt/lib/cmake_install.cmake:37 (include)
71> C:/svnwork/build2017-llvm/projects/compiler-rt/cmake_install.cmake:33 (include)
71> C:/svnwork/build2017-llvm/projects/cmake_install.cmake:32 (include)
71> C:/svnwork/build2017-llvm/cmake_install.cmake:65 (include)
71>
71>
71>CMake Error at C:/svnwork/build2017-llvm/projects/compiler-rt/lib/ubsan/cmake_install.cmake:46 (file):
71> file INSTALL cannot find
71> “C:/svnwork/build2017-llvm/$(Configuration)/lib/clang/5.0.0/lib/windows/clang_rt.ubsan_standalone_cxx-i386.lib”.
71>Call Stack (most recent call first):
71> C:/svnwork/build2017-llvm/projects/compiler-rt/lib/cmake_install.cmake:37 (include)
71> C:/svnwork/build2017-llvm/projects/compiler-rt/cmake_install.cmake:33 (include)
71> C:/svnwork/build2017-llvm/projects/cmake_install.cmake:32 (include)
71> C:/svnwork/build2017-llvm/cmake_install.cmake:65 (include)
71>
71>
71>CMake Error at C:/svnwork/build2017-llvm/projects/compiler-rt/lib/asan/cmake_install.cmake:34 (file):
71> file INSTALL cannot find
71> “C:/svnwork/build2017-llvm/$(Configuration)/lib/clang/5.0.0/lib/windows/clang_rt.asan-i386.lib”.
71>Call Stack (most recent call first):
71> C:/svnwork/build2017-llvm/projects/compiler-rt/lib/cmake_install.cmake:38 (include)
71> C:/svnwork/build2017-llvm/projects/compiler-rt/cmake_install.cmake:33 (include)
71> C:/svnwork/build2017-llvm/projects/cmake_install.cmake:32 (include)
71> C:/svnwork/build2017-llvm/cmake_install.cmake:65 (include)
71>
71>
71>CMake Error at C:/svnwork/build2017-llvm/projects/compiler-rt/lib/asan/cmake_install.cmake:46 (file):
71> file INSTALL cannot find
71> “C:/svnwork/build2017-llvm/$(Configuration)/lib/clang/5.0.0/lib/windows/clang_rt.asan_cxx-i386.lib”.
71>Call Stack (most recent call first):
71> C:/svnwork/build2017-llvm/projects/compiler-rt/lib/cmake_install.cmake:38 (include)
71> C:/svnwork/build2017-llvm/projects/compiler-rt/cmake_install.cmake:33 (include)
71> C:/svnwork/build2017-llvm/projects/cmake_install.cmake:32 (include)
71> C:/svnwork/build2017-llvm/cmake_install.cmake:65 (include)
71>
71>
71>CMake Error at C:/svnwork/build2017-llvm/projects/compiler-rt/lib/asan/cmake_install.cmake:58 (file):
71> file INSTALL cannot find
71> “C:/svnwork/build2017-llvm/$(Configuration)/lib/clang/5.0.0/lib/windows/clang_rt.asan-preinit-i386.lib”.
71>Call Stack (most recent call first):
71> C:/svnwork/build2017-llvm/projects/compiler-rt/lib/cmake_install.cmake:38 (include)
71> C:/svnwork/build2017-llvm/projects/compiler-rt/cmake_install.cmake:33 (include)
71> C:/svnwork/build2017-llvm/projects/cmake_install.cmake:32 (include)
71> C:/svnwork/build2017-llvm/cmake_install.cmake:65 (include)
71>
71>
71>CMake Error at C:/svnwork/build2017-llvm/projects/compiler-rt/lib/asan/cmake_install.cmake:82 (file):
71> file INSTALL cannot find
71> “C:/svnwork/build2017-llvm/$(Configuration)/lib/clang/5.0.0/lib/windows/clang_rt.asan_dynamic-i386.dll”.
71>Call Stack (most recent call first):
71> C:/svnwork/build2017-llvm/projects/compiler-rt/lib/cmake_install.cmake:38 (include)
71> C:/svnwork/build2017-llvm/projects/compiler-rt/cmake_install.cmake:33 (include)
71> C:/svnwork/build2017-llvm/projects/cmake_install.cmake:32 (include)
71> C:/svnwork/build2017-llvm/cmake_install.cmake:65 (include)
71>
71>
71>CMake Error at C:/svnwork/build2017-llvm/projects/compiler-rt/lib/asan/cmake_install.cmake:94 (file):
71> file INSTALL cannot find
71> “C:/svnwork/build2017-llvm/$(Configuration)/lib/clang/5.0.0/lib/windows/clang_rt.asan_dll_thunk-i386.lib”.
71>Call Stack (most recent call first):
71> C:/svnwork/build2017-llvm/projects/compiler-rt/lib/cmake_install.cmake:38 (include)
71> C:/svnwork/build2017-llvm/projects/compiler-rt/cmake_install.cmake:33 (include)
71> C:/svnwork/build2017-llvm/projects/cmake_install.cmake:32 (include)
71> C:/svnwork/build2017-llvm/cmake_install.cmake:65 (include)
71>
71>
71>CMake Error at C:/svnwork/build2017-llvm/projects/compiler-rt/lib/asan/cmake_install.cmake:106 (file):
71> file INSTALL cannot find
71> “C:/svnwork/build2017-llvm/$(Configuration)/lib/clang/5.0.0/lib/windows/clang_rt.asan_dynamic_runtime_thunk-i386.lib”.
71>Call Stack (most recent call first):
71> C:/svnwork/build2017-llvm/projects/compiler-rt/lib/cmake_install.cmake:38 (include)
71> C:/svnwork/build2017-llvm/projects/compiler-rt/cmake_install.cmake:33 (include)
71> C:/svnwork/build2017-llvm/projects/cmake_install.cmake:32 (include)
71> C:/svnwork/build2017-llvm/cmake_install.cmake:65 (include)
71>
71>
71>CMake Error at C:/svnwork/build2017-llvm/projects/compiler-rt/lib/profile/cmake_install.cmake:34 (file):
71> file INSTALL cannot find
71> “C:/svnwork/build2017-llvm/$(Configuration)/lib/clang/5.0.0/lib/windows/clang_rt.profile-i386.lib”.
71>Call Stack (most recent call first):
71> C:/svnwork/build2017-llvm/projects/compiler-rt/lib/cmake_install.cmake:39 (include)
71> C:/svnwork/build2017-llvm/projects/compiler-rt/cmake_install.cmake:33 (include)
71> C:/svnwork/build2017-llvm/projects/cmake_install.cmake:32 (include)
71> C:/svnwork/build2017-llvm/cmake_install.cmake:65 (include)

Hi

I replaced $(Configuration) Release in cmake_install.cmake manually,
the errors didn’t happen.

Regards.