Merge pull request #4056 from svick/threadpoolglobals-readonly
[platform/upstream/coreclr.git] / build-packages.sh
1 #!/usr/bin/env bash
2
3 usage()
4 {
5     echo "Builds the NuGet packages from the binaries that were built in the Build product binaries step."
6     echo "Usage: build-packages -BuildArch -BuildType"
7     echo "arch can be x64, x86, arm, arm64 (default is x64)"
8     echo "configuration can be release, checked, debug (default is debug)"
9     echo
10     exit 1
11 }
12
13 __ProjectRoot="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
14
15 unprocessedBuildArgs=
16
17 while :; do
18     if [ $# -le 0 ]; then
19         break
20     fi
21
22     case "$1" in
23         -\?|-h|--help)
24         usage
25         exit 1
26         ;;
27         -BuildArch=*)
28         unprocessedBuildArgs="$unprocessedBuildArgs $1"
29         __Arch=$(echo $1| cut -d'=' -f 2)
30         ;;
31         *)
32         unprocessedBuildArgs="$unprocessedBuildArgs $1"
33     esac
34     shift
35 done
36
37 $__ProjectRoot/run.sh build-packages -Project=$__ProjectRoot/src/.nuget/Microsoft.NETCore.Runtime.CoreCLR/Microsoft.NETCore.Runtime.CoreCLR.builds -DistroRid=\${OSRid}-$__Arch -UseSharedCompilation=false -BuildNugetPackage=false $unprocessedBuildArgs
38 if [ $? -ne 0 ]
39 then
40     echo "ERROR: An error occurred while building packages; See build-packages.log for more details."
41     exit 1
42 fi
43
44 $__ProjectRoot/run.sh build-packages -Project=$__ProjectRoot/src/.nuget/Microsoft.NETCore.Jit/Microsoft.NETCore.Jit.builds -DistroRid=\${OSRid}-$__Arch -UseSharedCompilation=false -BuildNugetPackage=false $unprocessedBuildArgs
45 if [ $? -ne 0 ]
46 then
47     echo "ERROR: An error occurred while building packages; See build-packages.log for more details."
48     exit 1
49 fi
50
51 $__ProjectRoot/run.sh build-packages -Project=$__ProjectRoot/src/.nuget/Microsoft.NETCore.ILAsm/Microsoft.NETCore.ILAsm.builds -DistroRid=\${OSRid}-$__Arch -UseSharedCompilation=false -BuildNugetPackage=false $unprocessedBuildArgs
52 if [ $? -ne 0 ]
53 then
54     echo "ERROR: An error occurred while building packages; See build-packages.log for more details."
55     exit 1
56 fi
57
58 $__ProjectRoot/run.sh build-packages -Project=$__ProjectRoot/src/.nuget/Microsoft.NETCore.ILDAsm/Microsoft.NETCore.ILDAsm.builds -DistroRid=\${OSRid}-$__Arch -UseSharedCompilation=false -BuildNugetPackage=false $unprocessedBuildArgs
59 if [ $? -ne 0 ]
60 then
61     echo "ERROR: An error occurred while building packages; See build-packages.log for more details."
62     exit 1
63 fi
64
65 # Build the TestHost package
66 $__ProjectRoot/run.sh build-packages -Project=$__ProjectRoot/src/.nuget/Microsoft.NETCore.TestHost/Microsoft.NETCore.TestHost.builds -DistroRid=\${OSRid}-$__Arch -UseSharedCompilation=false -BuildNugetPackage=false $unprocessedBuildArgs
67 if [ $? -ne 0 ]; then
68     echo "ERROR: An error occurred while building packages, see $build_packages_log for more details."
69     exit 1
70 fi
71
72 echo "Done building packages."
73 exit 0