summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLakshmi Priya Sekar <lasekar@microsoft.com>2016-08-01 18:06:30 -0700
committerLakshmi Priya Sekar <lasekar@microsoft.com>2016-08-01 18:08:23 -0700
commit8dea67f63f3f308c3423c3cc6eac5823ea8ae081 (patch)
tree96062ea6516b98b37484cd0aab302196b167052f
parentd7ca197675ef4e17ad3d7eaa4f14f364557fa2a3 (diff)
downloadcoreclr-8dea67f63f3f308c3423c3cc6eac5823ea8ae081.tar.gz
coreclr-8dea67f63f3f308c3423c3cc6eac5823ea8ae081.tar.bz2
coreclr-8dea67f63f3f308c3423c3cc6eac5823ea8ae081.zip
Change processing of args in build scripts to keep =.
-rw-r--r--build-test.cmd29
-rw-r--r--build.cmd58
2 files changed, 43 insertions, 44 deletions
diff --git a/build-test.cmd b/build-test.cmd
index f2b5d2ae86..80170a4134 100644
--- a/build-test.cmd
+++ b/build-test.cmd
@@ -35,27 +35,28 @@ if /i "%1" == "-?" goto Usage
if /i "%1" == "-h" goto Usage
if /i "%1" == "-help" goto Usage
-if /i "%1" == "x64" (set __BuildArch=x64&set processedArgs=!processedArgs! %1&goto Arg_Next)
-if /i "%1" == "x86" (set __BuildArch=x86&set processedArgs=!processedArgs! %1&goto Arg_Next)
-if /i "%1" == "arm" (set __BuildArch=arm&set processedArgs=!processedArgs! %1&goto Arg_Next)
-if /i "%1" == "arm64" (set __BuildArch=arm64&set processedArgs=!processedArgs! %1&goto Arg_Next)
+if /i "%1" == "x64" (set __BuildArch=x64&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
+if /i "%1" == "x86" (set __BuildArch=x86&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
+if /i "%1" == "arm" (set __BuildArch=arm&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
+if /i "%1" == "arm64" (set __BuildArch=arm64&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
-if /i "%1" == "debug" (set __BuildType=Debug&set processedArgs=!processedArgs! %1&goto Arg_Next)
-if /i "%1" == "release" (set __BuildType=Release&set processedArgs=!processedArgs! %1&goto Arg_Next)
-if /i "%1" == "checked" (set __BuildType=Checked&set processedArgs=!processedArgs! %1&goto Arg_Next)
+if /i "%1" == "debug" (set __BuildType=Debug&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
+if /i "%1" == "release" (set __BuildType=Release&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
+if /i "%1" == "checked" (set __BuildType=Checked&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
if /i "%1" == "crossgen" (set __crossgen=true&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
-if /i "%1" == "skipmanaged" (set __SkipManaged=1&set processedArgs=!processedArgs! %1&goto Arg_Next)
+if /i "%1" == "skipmanaged" (set __SkipManaged=1&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
if /i "%1" == "updateinvalidpackages" (set __UpdateInvalidPackagesArg=1&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
-if /i "%1" == "toolset_dir" (set __ToolsetDir=%2&set __PassThroughArgs=%__PassThroughArgs% %2&set processedArgs=!processedArgs! %1 %2&shift&goto Arg_Next)
+if /i "%1" == "toolset_dir" (set __ToolsetDir=%2&set __PassThroughArgs=%__PassThroughArgs% %2&set processedArgs=!processedArgs! %1 %2&shift&shift&goto Arg_Loop)
-set __unprocessedBuildArgs=!__unprocessedBuildArgs! %1
-
-:Arg_Next
-shift /1
-goto :Arg_Loop
+if [!processedArgs!]==[] (
+ call set __UnprocessedBuildArgs=!__args!
+) else (
+ call set __UnprocessedBuildArgs=%%__args:*!processedArgs!=%%
+)
:ArgsDone
+
set __RunArgs=-BuildOS=%__BuildOS% -BuildType=%__BuildType% -BuildArch=%__BuildArch%
rem arm64 builds currently use private toolset which has not been released yet
diff --git a/build.cmd b/build.cmd
index 28b87e59e6..77a216f8de 100644
--- a/build.cmd
+++ b/build.cmd
@@ -75,42 +75,40 @@ if /i "%1" == "-?" goto Usage
if /i "%1" == "-h" goto Usage
if /i "%1" == "-help" goto Usage
-if /i "%1" == "all" (set __BuildAll=1&set processedArgs=!processedArgs! %1&goto Arg_Next)
-if /i "%1" == "x64" (set __BuildArchX64=1&set processedArgs=!processedArgs! %1&goto Arg_Next)
-if /i "%1" == "x86" (set __BuildArchX86=1&set processedArgs=!processedArgs! %1&goto Arg_Next)
-if /i "%1" == "arm" (set __BuildArchArm=1&set processedArgs=!processedArgs! %1&goto Arg_Next)
-if /i "%1" == "arm64" (set __BuildArchArm64=1&set processedArgs=!processedArgs! %1&goto Arg_Next)
+if /i "%1" == "all" (set __BuildAll=1&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
+if /i "%1" == "x64" (set __BuildArchX64=1&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
+if /i "%1" == "x86" (set __BuildArchX86=1&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
+if /i "%1" == "arm" (set __BuildArchArm=1&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
+if /i "%1" == "arm64" (set __BuildArchArm64=1&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
-if /i "%1" == "debug" (set __BuildTypeDebug=1&set processedArgs=!processedArgs! %1&goto Arg_Next)
-if /i "%1" == "checked" (set __BuildTypeChecked=1&set processedArgs=!processedArgs! %1&goto Arg_Next)
-if /i "%1" == "release" (set __BuildTypeRelease=1&set processedArgs=!processedArgs! %1&goto Arg_Next)
+if /i "%1" == "debug" (set __BuildTypeDebug=1&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
+if /i "%1" == "checked" (set __BuildTypeChecked=1&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
+if /i "%1" == "release" (set __BuildTypeRelease=1&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
REM All arguments after this point will be passed through directly to build.cmd on nested invocations
REM using the "all" argument, and must be added to the __PassThroughArgs variable.
set __PassThroughArgs=%__PassThroughArgs% %1
-if /i "%1" == "freebsdmscorlib" (set __BuildNativeCoreLib=0&set __BuildNative=0&set __BuildTests=0&set __BuildPackages=0&set __BuildOS=FreeBSD&set __SkipNugetPackage=1&set processedArgs=!processedArgs! %1&goto Arg_Next)
-if /i "%1" == "linuxmscorlib" (set __BuildNativeCoreLib=0&set __BuildNative=0&set __BuildTests=0&set __BuildPackages=0&set __BuildOS=Linux&set __SkipNugetPackage=1&set processedArgs=!processedArgs! %1&goto Arg_Next)
-if /i "%1" == "netbsdmscorlib" (set __BuildNativeCoreLib=0&set __BuildNative=0&set __BuildTests=0&set __BuildPackages=0&set __BuildOS=NetBSD&set __SkipNugetPackage=1&set processedArgs=!processedArgs! %1&goto Arg_Next)
-if /i "%1" == "osxmscorlib" (set __BuildNativeCoreLib=0&set __BuildNative=0&set __BuildTests=0&set __BuildPackages=0&set __BuildOS=OSX&set __SkipNugetPackage=1&set processedArgs=!processedArgs! %1&goto Arg_Next)
-if /i "%1" == "windowsmscorlib" (set __BuildNativeCoreLib=0&set __BuildNative=0&set __BuildTests=0&set __BuildPackages=0&set __BuildOS=Windows_NT&set __SkipNugetPackage=1&set processedArgs=!processedArgs! %1&goto Arg_Next)
-if /i "%1" == "nativemscorlib" (set __BuildNativeCoreLib=1&set __BuildCoreLib=0&set __BuildNative=0&set __BuildTests=0&set __BuildPackages=0&set processedArgs=!processedArgs! %1&goto Arg_Next)
-if /i "%1" == "configureonly" (set __ConfigureOnly=1&set __BuildNative=1&set __BuildNativeCoreLib=0&set __BuildCoreLib=0&set __BuildTests=0&set __BuildPackages=0&set processedArgs=!processedArgs! %1&goto Arg_Next)
-if /i "%1" == "skipconfigure" (set __SkipConfigure=1&set processedArgs=!processedArgs! %1&goto Arg_Next)
-if /i "%1" == "skipmscorlib" (set __BuildCoreLib=0&set __BuildNativeCoreLib=0&set processedArgs=!processedArgs! %1&goto Arg_Next)
-if /i "%1" == "skipnative" (set __BuildNative=0&set processedArgs=!processedArgs! %1&goto Arg_Next)
-if /i "%1" == "skiptests" (set __BuildTests=0&set processedArgs=!processedArgs! %1&goto Arg_Next)
-if /i "%1" == "skipbuildpackages" (set __BuildPackages=0&set processedArgs=!processedArgs! %1&goto Arg_Next)
-if /i "%1" == "buildjit32" (set __BuildJit32="-DBUILD_JIT32=1"&set processedArgs=!processedArgs! %1&goto Arg_Next)
-if /i "%1" == "toolset_dir" (set __ToolsetDir=%2&set __PassThroughArgs=%__PassThroughArgs% %2&set processedArgs=!processedArgs! %1 %2&shift&goto Arg_Next)
-if /i "%1" == "-priority" (set __UnprocessedBuildArgs=!__UnprocessedBuildArgs! %1=%2&shift&goto Arg_Next)
-if /i "%1" == "-officialbuildid" (set __UnprocessedBuildArgs=!__UnprocessedBuildArgs! %1=%2&shift&goto Arg_Next)
-
-set __UnprocessedBuildArgs=!__UnprocessedBuildArgs! %1
-
-:Arg_Next
-shift /1
-goto :Arg_Loop
+if /i "%1" == "freebsdmscorlib" (set __BuildNativeCoreLib=0&set __BuildNative=0&set __BuildTests=0&set __BuildPackages=0&set __BuildOS=FreeBSD&set __SkipNugetPackage=1&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
+if /i "%1" == "linuxmscorlib" (set __BuildNativeCoreLib=0&set __BuildNative=0&set __BuildTests=0&set __BuildPackages=0&set __BuildOS=Linux&set __SkipNugetPackage=1&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
+if /i "%1" == "netbsdmscorlib" (set __BuildNativeCoreLib=0&set __BuildNative=0&set __BuildTests=0&set __BuildPackages=0&set __BuildOS=NetBSD&set __SkipNugetPackage=1&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
+if /i "%1" == "osxmscorlib" (set __BuildNativeCoreLib=0&set __BuildNative=0&set __BuildTests=0&set __BuildPackages=0&set __BuildOS=OSX&set __SkipNugetPackage=1&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
+if /i "%1" == "windowsmscorlib" (set __BuildNativeCoreLib=0&set __BuildNative=0&set __BuildTests=0&set __BuildPackages=0&set __BuildOS=Windows_NT&set __SkipNugetPackage=1&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
+if /i "%1" == "nativemscorlib" (set __BuildNativeCoreLib=1&set __BuildCoreLib=0&set __BuildNative=0&set __BuildTests=0&set __BuildPackages=0&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
+if /i "%1" == "configureonly" (set __ConfigureOnly=1&set __BuildNative=1&set __BuildNativeCoreLib=0&set __BuildCoreLib=0&set __BuildTests=0&set __BuildPackages=0&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
+if /i "%1" == "skipconfigure" (set __SkipConfigure=1&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
+if /i "%1" == "skipmscorlib" (set __BuildCoreLib=0&set __BuildNativeCoreLib=0&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
+if /i "%1" == "skipnative" (set __BuildNative=0&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
+if /i "%1" == "skiptests" (set __BuildTests=0&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
+if /i "%1" == "skipbuildpackages" (set __BuildPackages=0&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
+if /i "%1" == "buildjit32" (set __BuildJit32="-DBUILD_JIT32=1"&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
+if /i "%1" == "toolset_dir" (set __ToolsetDir=%2&set __PassThroughArgs=%__PassThroughArgs% %2&set processedArgs=!processedArgs! %1 %2&shift&shift&goto Arg_Loop)
+
+if [!processedArgs!]==[] (
+ call set __UnprocessedBuildArgs=!__args!
+) else (
+ call set __UnprocessedBuildArgs=%%__args:*!processedArgs!=%%
+)
:ArgsDone