diff options
| author | Hans Wennborg <hans@hanshq.net> | 2014-09-30 22:30:06 +0000 |
|---|---|---|
| committer | Hans Wennborg <hans@hanshq.net> | 2014-09-30 22:30:06 +0000 |
| commit | 437aa948b838c137333575c2e53b92e133d09f4d (patch) | |
| tree | 94b76a037f93def5996af56d50c7d0d4d5ad0994 /llvm/tools/msbuild | |
| parent | fc0296704c6abbdce9f888a2ff1e4acbfd859746 (diff) | |
| download | bcm5719-llvm-437aa948b838c137333575c2e53b92e133d09f4d.tar.gz bcm5719-llvm-437aa948b838c137333575c2e53b92e133d09f4d.zip | |
MSBuild integration: fix the loop in install.bat
It would previously not continue the platforms loop
unless it could find the latest toolset directory.
llvm-svn: 218712
Diffstat (limited to 'llvm/tools/msbuild')
| -rw-r--r-- | llvm/tools/msbuild/install.bat | 18 | ||||
| -rw-r--r-- | llvm/tools/msbuild/uninstall.bat | 8 |
2 files changed, 18 insertions, 8 deletions
diff --git a/llvm/tools/msbuild/install.bat b/llvm/tools/msbuild/install.bat index 18057b4d40f..6e321e3f580 100644 --- a/llvm/tools/msbuild/install.bat +++ b/llvm/tools/msbuild/install.bat @@ -6,13 +6,15 @@ set SUCCESS=0 REM Change to the directory of this batch file.
cd /d %~dp0
+REM Loop over the two platforms in awkward batch file fashion.
set PLATFORM=None
-:START
-IF %PLATFORM% == x64 GOTO LOOPEND
+:PLATFORMLOOPHEAD
+IF %PLATFORM% == x64 GOTO PLATFORMLOOPEND
IF %PLATFORM% == Win32 SET PLATFORM=x64
IF %PLATFORM% == None SET PLATFORM=Win32
REM Search for the MSBuild toolsets directory.
+
SET D="%ProgramFiles%\MSBuild\Microsoft.Cpp\v4.0\Platforms\%PLATFORM%\PlatformToolsets"
IF EXIST %D% GOTO FOUND_V100
SET D="%ProgramFiles(x86)%\MSBuild\Microsoft.Cpp\v4.0\Platforms\%PLATFORM%\PlatformToolsets"
@@ -36,13 +38,18 @@ IF EXIST %D% GOTO FOUND_V140 SET D="%ProgramFiles(x86)%\MSBuild\Microsoft.Cpp\v4.0\V140\Platforms\%PLATFORM%\PlatformToolsets"
IF EXIST %D% GOTO FOUND_V140
-:LOOPEND
+:TRY_V150
+
+GOTO PLATFORMLOOPHEAD
+
+:PLATFORMLOOPEND
IF %SUCCESS% == 1 goto DONE
echo Failed to find MSBuild toolsets directory.
goto FAILED
:FOUND_V100
+REM Routine for installing v100 toolchain.
IF NOT EXIST %D%\LLVM-vs2010 mkdir %D%\LLVM-vs2010
IF NOT %ERRORLEVEL% == 0 GOTO FAILED
copy %PLATFORM%\Microsoft.Cpp.%PLATFORM%.LLVM-vs2010.props %D%\LLVM-vs2010
@@ -53,6 +60,7 @@ set SUCCESS=1 GOTO TRY_V110
:FOUND_V110
+REM Routine for installing v110 toolchain.
IF NOT EXIST %D%\LLVM-vs2012 mkdir %D%\LLVM-vs2012
IF NOT %ERRORLEVEL% == 0 GOTO FAILED
copy %PLATFORM%\Microsoft.Cpp.%PLATFORM%.LLVM-vs2012.props %D%\LLVM-vs2012
@@ -69,6 +77,7 @@ set SUCCESS=1 GOTO TRY_V120
:FOUND_V120
+REM Routine for installing v120 toolchain.
IF NOT EXIST %D%\LLVM-vs2013 mkdir %D%\LLVM-vs2013
IF NOT %ERRORLEVEL% == 0 GOTO FAILED
copy %PLATFORM%\toolset-vs2013.props %D%\LLVM-vs2013\toolset.props
@@ -85,6 +94,7 @@ set SUCCESS=1 GOTO TRY_V140
:FOUND_V140
+REM Routine for installing v140 toolchain.
IF NOT EXIST %D%\LLVM-vs2014 mkdir %D%\LLVM-vs2014
IF NOT %ERRORLEVEL% == 0 GOTO FAILED
copy %PLATFORM%\toolset-vs2014.props %D%\LLVM-vs2014\toolset.props
@@ -98,7 +108,7 @@ IF NOT %ERRORLEVEL% == 0 GOTO FAILED copy %PLATFORM%\toolset-vs2014_xp.targets %D%\LLVM-vs2014_xp\toolset.targets
IF NOT %ERRORLEVEL% == 0 GOTO FAILED
set SUCCESS=1
-GOTO START
+GOTO TRY_V150
:DONE
diff --git a/llvm/tools/msbuild/uninstall.bat b/llvm/tools/msbuild/uninstall.bat index ec9fecfc419..c1afae2c3c9 100644 --- a/llvm/tools/msbuild/uninstall.bat +++ b/llvm/tools/msbuild/uninstall.bat @@ -6,8 +6,8 @@ REM CD to the directory of this batch file. cd /d %~dp0
set PLATFORM=None
-:START
-IF %PLATFORM% == x64 GOTO END
+:LOOPHEAD
+IF %PLATFORM% == x64 GOTO LOOPEND
IF %PLATFORM% == Win32 SET PLATFORM=x64
IF %PLATFORM% == None SET PLATFORM=Win32
@@ -67,7 +67,7 @@ IF EXIST %D%\LLVM-vs2014_xp del %D%\LLVM-vs2014_xp\toolset.targets IF EXIST %D%\LLVM-vs2014_xp rmdir %D%\LLVM-vs2014_xp
-GOTO START
+GOTO LOOPHEAD
-:END
+:LOOPEND
echo Done!
|

