[llvm] r323427 - Update build_llvm_package.bat

Hans Wennborg via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 25 06:43:10 PST 2018


Author: hans
Date: Thu Jan 25 06:43:10 2018
New Revision: 323427

URL: http://llvm.org/viewvc/llvm-project?rev=323427&view=rev
Log:
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

Modified:
    llvm/trunk/utils/release/build_llvm_package.bat

Modified: llvm/trunk/utils/release/build_llvm_package.bat
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/release/build_llvm_package.bat?rev=323427&r1=323426&r2=323427&view=diff
==============================================================================
--- llvm/trunk/utils/release/build_llvm_package.bat (original)
+++ llvm/trunk/utils/release/build_llvm_package.bat Thu Jan 25 06:43:10 2018
@@ -21,8 +21,8 @@ REM   https://github.com/swig/swig/issue
 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
 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=Relea
 
 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-for
 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




More information about the llvm-commits mailing list