Index: llvm/utils/release/build_llvm_release.bat =================================================================== --- llvm/utils/release/build_llvm_release.bat +++ llvm/utils/release/build_llvm_release.bat @@ -1,6 +1,24 @@ @echo off setlocal +REM Script for building the LLVM installer on Windows. +REM +REM Note: +REM To enable the creation of symbolic links: +REM - Run the script with administrator permissions, or +REM - Use the 7-zip version 20.x or older. + +REM Check for correct 7-zip version and/or administrator permissions. +for /f "delims=" %%i in ('7z.exe ^| findstr /r "2[1-3]"') do set version=%%i +if not "%version%"=="" ( + if not exist %SYSTEMROOT%\SYSTEM32\WDI\LOGFILES ( + echo. + echo Script requires administrator permissions, or a 7-zip version 20.x or older. + echo Current version is "%version%" + exit /b + ) +) + if "%1"=="" goto usage goto begin