[cfe-users] package build fails at r324504 or later on VS2017
masaru tsuchiyama via cfe-users
cfe-users at lists.llvm.org
Tue Feb 13 04:45:46 PST 2018
Hello
llvm build fails at r324504 or later.
I used the attached file to build. (renamed to .txt)
example:
clang-build.bat ninja x86 update 324806
This is the tail of the failure log.
CPack: Create package using NSIS
CPack: Install projects
CPack: - Install project: LLVM
Creating llvm-ranlib.exe
Creating llvm-lib.exe
Creating llvm-dlltool.exe
Creating clang++.exe
Creating clang-cl.exe
Creating clang-cpp.exe
Creating ../msbuild-bin/cl.exe
Creating lld-link.exe
Creating ld.lld.exe
Creating ld64.lld.exe
Creating wasm-ld.exe
Creating llvm-readelf.exe
CPack: Create package
CPack Error: Problem running NSIS command: "C:/Program Files
(x86)/NSIS/makensis.exe"
"C:/Jenkins/workspace/llvm/build/_CPack_Packages/win32/NSIS/project.nsi"
Please check
C:/Jenkins/workspace/llvm/build/_CPack_Packages/win32/NSIS/NSISOutput.log
for errors
CPack Error: Problem compressing the directory
CPack Error: Error when generating package: LLVM
FAILED: CMakeFiles/package.util
cmd.exe /C "cd /D C:\Jenkins\workspace\llvm\build && "C:\Program
Files\CMake\bin\cpack.exe" --config ./CPackConfig.cmake"
ninja: build stopped: subcommand failed.
I confirmed that the build succeeded by reverting r324504 at r324806.
Index: cmake/modules/HandleLLVMOptions.cmake
===================================================================
--- cmake/modules/HandleLLVMOptions.cmake (revision 324806)
+++ cmake/modules/HandleLLVMOptions.cmake (working copy)
@@ -353,12 +353,6 @@
append("/Zc:inline" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
- # Generate PDB even in release for profiling.
- if (uppercase_CMAKE_BUILD_TYPE STREQUAL "RELEASE")
- append("/Zi" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
- append("/DEBUG" CMAKE_EXE_LINKER_FLAGS CMAKE_MODULE_LINKER_FLAGS
CMAKE_SHARED_LINKER_FLAGS)
- endif (uppercase_CMAKE_BUILD_TYPE STREQUAL "RELEASE")
-
# /Zc:strictStrings is incompatible with VS12's (Visual Studio 2013's)
# debug mode headers. Instead of only enabling them in VS2013's debug
mode,
# we'll just enable them for Visual Studio 2015 (VS 14, MSVC_VERSION
1900)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-users/attachments/20180213/60b44905/attachment.html>
-------------- next part --------------
@echo off
set INITDIR=%CD%
set PARAM_BUILDTOOL=%1
if "%PARAM_BUILDTOOL%" == "ninja" (
set BUILDTOOL=%PARAM_BUILDTOOL%
set CMAKE_GENERATOR=Ninja
set CONFIGURATION=Release
) else if "%PARAM_BUILDTOOL%" == "vs2017" (
set BUILDTOOL=%PARAM_BUILDTOOL%
set CMAKE_GENERATOR="Visual Studio 15 2017"
) else (
goto SHOW_HELP
)
set PARAM_ARCH=%2
if "%PARAM_ARCH%" == "x86" (
set BUILD_ARCH=%PARAM_ARCH%
set PARAM_ARCH=Win32
) else if "%PARAM_ARCH%" == "x64" (
set BUILD_ARCH=%PARAM_ARCH%
set PARAM_ARCH=x64
) else (
goto SHOW_HELP
)
set PARAM_ACTION=%3
if "%PARAM_ACTION%" == "rebuild" (
set BUILD_ACTION=%PARAM_ACTION%
) else if "%PARAM_ACTION%" == "update" (
set BUILD_ACTION=%PARAM_ACTION%
) else (
set BUILD_ACTION=update
)
set REVISION=%4
if "%REVISION%" == "" (
set REVISION=HEAD
)
set CMAKE=cmake.exe
set NINJA=ninja.exe
set DEVENV="C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\devenv.com"
set ROOTDIR=%INITDIR%\llvm-%REVISION%
if "%CONFIGURATION%" == "" (
set BUILDDIR=%ROOTDIR%\build-%BUILDTOOL%-%BUILD_ARCH%
) else (
set BUILDDIR=%ROOTDIR%\build-%BUILDTOOL%-%BUILD_ARCH%-%CONFIGURATION%
)
if exist %ROOTDIR% (
svn update -r %REVISION% %ROOTDIR%
) else (
svn co -r %REVISION% http://llvm.org/svn/llvm-project/llvm/trunk %ROOTDIR%
)
if exist %ROOTDIR%\tools\clang (
svn update -r %REVISION% %ROOTDIR%\tools\clang
) else (
svn co -r %REVISION% http://llvm.org/svn/llvm-project/cfe/trunk %ROOTDIR%\tools\clang
)
if exist %ROOTDIR%\tools\lld (
svn update -r %REVISION% %ROOTDIR%\tools\lld
) else (
svn co -r %REVISION% http://llvm.org/svn/llvm-project/lld/trunk %ROOTDIR%\tools\lld
)
if exist %ROOTDIR%\tools\polly (
svn update -r %REVISION% %ROOTDIR%\tools\polly
) else (
svn co -r %REVISION% http://llvm.org/svn/llvm-project/polly/trunk %ROOTDIR%\tools\polly
)
if exist %ROOTDIR%\projects\compiler-rt (
svn update -r %REVISION% %ROOTDIR%\projects\compiler-rt
) else (
svn co -r %REVISION% http://llvm.org/svn/llvm-project/compiler-rt/trunk %ROOTDIR%\projects\compiler-rt
)
if exist %ROOTDIR%\projects\libcxx (
svn update -r %REVISION% %ROOTDIR%\projects\libcxx
) else (
svn co -r %REVISION% http://llvm.org/svn/llvm-project/libcxx/trunk %ROOTDIR%\projects\libcxx
)
if exist %ROOTDIR%\projects\libcxxabi (
svn update -r %REVISION% %ROOTDIR%\projects\libcxxabi
) else (
svn co -r %REVISION% http://llvm.org/svn/llvm-project/libcxxabi/trunk %ROOTDIR%\projects\libcxxabi
)
if "%BUILD_ACTION%" == "rebuild" (
echo rebuild
if exist %BUILDDIR% rmdir /s /q %BUILDDIR%
if exist %BUILDDIR% rmdir /s /q %BUILDDIR%
if exist %BUILDDIR% rmdir /s /q %BUILDDIR%
if exist %BUILDDIR% rmdir /s /q %BUILDDIR%
if exist %BUILDDIR% rmdir /s /q %BUILDDIR%
if exist %BUILDDIR% rmdir /s /q %BUILDDIR%
if exist %BUILDDIR% rmdir /s /q %BUILDDIR%
if exist %BUILDDIR% rmdir /s /q %BUILDDIR%
if exist %BUILDDIR% exit /b 1
if not exist %BUILDDIR% mkdir %BUILDDIR%
) else if "%BUILD_ACTION%" == "update" (
echo update
if not exist %BUILDDIR% mkdir %BUILDDIR%
)
cd /d %BUILDDIR%
del /Q LLVM-*.exe
@echo on
call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" %BUILD_ARCH%
cd /d %BUILDDIR%
if "%BUILDTOOL%" == "ninja" (
%CMAKE% -G %CMAKE_GENERATOR% -D CMAKE_INSTALL_PREFIX=c:\clang -D CMAKE_BUILD_TYPE=%CONFIGURATION% %ROOTDIR% || goto onerror
%NINJA% -v package || goto onerror
) else if "%BUILDTOOL%" == "vs2017" (
%CMAKE% -G %CMAKE_GENERATOR% -D CMAKE_INSTALL_PREFIX=c:\clang %ROOTDIR% || goto onerror
%DEVENV% LLVM.sln /build "Release|%PARAM_ARCH%" || goto onerror
)
cd /d %INITDIR%\
echo OK
exit /b 0
:onerror
cd /d %INITDIR%\
echo NG
exit /b 1
:SHOW_HELP
@echo off
echo clang-build.bat BUILDTOOL ARCH [action]
echo BUILDTOOL
echo ninja
echo vs2017
echo ARCH
echo x86: build for x86
echo x64: build for x64
echo action
echo update : update build
echo rebuild: rebuild
exit /b 1
More information about the cfe-users
mailing list