summaryrefslogtreecommitdiff
path: root/build.cmd
diff options
context:
space:
mode:
authorJames Ko <jamesqko@gmail.com>2016-05-30 13:36:10 -0400
committerJan Kotas <jkotas@microsoft.com>2016-05-30 10:36:10 -0700
commit99311238763b43488006f473cf2892b574287579 (patch)
treeb6475b2a7512bf483ddaef98702d454db1163830 /build.cmd
parent469c1339c9146e89e909eb201c82fe737c8d1081 (diff)
downloadcoreclr-99311238763b43488006f473cf2892b574287579.tar.gz
coreclr-99311238763b43488006f473cf2892b574287579.tar.bz2
coreclr-99311238763b43488006f473cf2892b574287579.zip
Fix: if errorlevel 0 is almost always true (#5308)
Explanation: if errorlevel n actually tests if the errorlevel is greater than or equal to n. See: http://ss64.com/nt/if.html
Diffstat (limited to 'build.cmd')
-rw-r--r--build.cmd4
1 files changed, 2 insertions, 2 deletions
diff --git a/build.cmd b/build.cmd
index a5e61092b5..04cef48228 100644
--- a/build.cmd
+++ b/build.cmd
@@ -456,7 +456,7 @@ echo %__MsgPrefix%Generating native image of System.Private.CoreLib for %__Build
set "__CrossGenCoreLibLog=%__LogsDir%\CrossgenCoreLib_%__BuildOS%__%__BuildArch%__%__BuildType%.log"
set "__CrossgenExe=%__CrossComponentBinDir%\crossgen.exe"
"%__CrossgenExe%" /Platform_Assemblies_Paths "%__BinDir%" /out "%__BinDir%\System.Private.CoreLib.ni.dll" "%__BinDir%\System.Private.CoreLib.dll" > "%__CrossGenCoreLibLog%" 2>&1
-if NOT errorlevel 0 (
+if %errorlevel% NEQ 0 (
echo %__MsgPrefix%Error: CrossGen System.Private.CoreLib build failed. Refer to the build log file for details:
echo %__CrossGenCoreLibLog%
exit /b 1
@@ -467,7 +467,7 @@ echo %__MsgPrefix%Generating native image of MScorlib facade for %__BuildOS%.%__
set "__CrossGenCoreLibLog=%__LogsDir%\CrossgenMSCoreLib_%__BuildOS%__%__BuildArch%__%__BuildType%.log"
set "__CrossgenExe=%__CrossComponentBinDir%\crossgen.exe"
"%__CrossgenExe%" /Platform_Assemblies_Paths "%__BinDir%" /out "%__BinDir%\mscorlib.ni.dll" "%__BinDir%\mscorlib.dll" > "%__CrossGenCoreLibLog%" 2>&1
-if NOT errorlevel 0 (
+if %errorlevel% NEQ 0 (
echo %__MsgPrefix%Error: CrossGen mscorlib facade build failed. Refer to the build log file for details:
echo %__CrossGenCoreLibLog%
exit /b 1