From bfb98438175a2e0647ce7781298ea57f846ba46a Mon Sep 17 00:00:00 2001 From: Hans Wennborg Date: Thu, 25 Jan 2018 14:43:10 +0000 Subject: [PATCH] Update build_llvm_package.bat I moved to a new machine and had to adjust a few things: - Use %USERNAME% instead of %USER% (not sure why %USER% didn't work anymore) - Update paths for using Python 3.6 instead of 3.5 - Skip building OpenMP which seems broken on Windows - Work around new vsdevcmd.bat changing paths: https://developercommunity.visualstudio.com/content/problem/26780/vsdevcmdbat-changes-the-current-working-directory.html - Build stage-0 compiler with MinSizeRel to work around VS 2017 bug: https://developercommunity.visualstudio.com/content/problem/139043/miscompile-in-trivial-c-program-with-155-preview-2.html git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@323427 91177308-0d34-0410-b5e6-96231b3b80d8 --- utils/release/build_llvm_package.bat | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/utils/release/build_llvm_package.bat b/utils/release/build_llvm_package.bat index 30b245fc73d..4842dd400f2 100755 --- a/utils/release/build_llvm_package.bat +++ b/utils/release/build_llvm_package.bat @@ -21,8 +21,8 @@ REM https://github.com/swig/swig/issues/769 REM You need to modify the paths below: set vsdevcmd=C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\Tools\VsDevCmd.bat -set python32_dir=C:\Users\%USER%\AppData\Local\Programs\Python\Python35-32 -set python64_dir=C:\Users\%USER%\AppData\Local\Programs\Python\Python35 +set python32_dir=C:\Users\%USERNAME%\AppData\Local\Programs\Python\Python36-32 +set python64_dir=C:\Users\%USERNAME%\AppData\Local\Programs\Python\Python36 set revision=%1 set branch=trunk @@ -47,7 +47,7 @@ svn.exe export -r %revision% http://llvm.org/svn/llvm-project/cfe/%branch% llvm/ svn.exe export -r %revision% http://llvm.org/svn/llvm-project/clang-tools-extra/%branch% llvm/tools/clang/tools/extra || exit /b svn.exe export -r %revision% http://llvm.org/svn/llvm-project/lld/%branch% llvm/tools/lld || exit /b svn.exe export -r %revision% http://llvm.org/svn/llvm-project/compiler-rt/%branch% llvm/projects/compiler-rt || exit /b -svn.exe export -r %revision% http://llvm.org/svn/llvm-project/openmp/%branch% llvm/projects/openmp || exit /b +REM svn.exe export -r %revision% http://llvm.org/svn/llvm-project/openmp/%branch% llvm/projects/openmp || exit /b svn.exe export -r %revision% http://llvm.org/svn/llvm-project/lldb/%branch% llvm/tools/lldb || exit /b @@ -56,12 +56,14 @@ set cmake_flags=-DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_ASSERTIONS=ON -DLLVM_IN REM TODO: Run all tests, including lld and compiler-rt. +set "VSCMD_START_DIR=%CD%" call "%vsdevcmd%" -arch=x86 set CC= set CXX= mkdir build32_stage0 cd build32_stage0 -cmake -GNinja %cmake_flags% -DPYTHON_HOME=%python32_dir% ..\llvm || exit /b +REM Work around VS2017 bug by using MinSizeRel. +cmake -GNinja %cmake_flags% -DPYTHON_HOME=%python32_dir% -DCMAKE_BUILD_TYPE=MinSizeRel ..\llvm || exit /b ninja all || exit /b ninja check || ninja check || ninja check || exit /b ninja check-clang || ninja check-clang || ninja check-clang || exit /b @@ -89,12 +91,14 @@ copy ..\llvm\tools\clang\tools\clang-format-vs\ClangFormat\bin\Release\ClangForm cd .. +set "VSCMD_START_DIR=%CD%" call "%vsdevcmd%" -arch=amd64 set CC= set CXX= mkdir build64_stage0 cd build64_stage0 -cmake -GNinja %cmake_flags% -DPYTHON_HOME=%python64_dir% ..\llvm || exit /b +REM Work around VS2017 bug by using MinSizeRel. +cmake -GNinja %cmake_flags% -DPYTHON_HOME=%python64_dir% -DCMAKE_BUILD_TYPE=MinSizeRel ..\llvm || exit /b ninja all || exit /b ninja check || ninja check || ninja check || exit /b ninja check-clang || ninja check-clang || ninja check-clang || exit /b -- 2.11.0