diff options
author | Pat Gavlin <pgavlin@gmail.com> | 2016-05-06 16:32:18 -0700 |
---|---|---|
committer | Pat Gavlin <pgavlin@gmail.com> | 2016-05-06 16:32:18 -0700 |
commit | 0ef1fc9aa3d65d41b5b9c8cd4911a1f8cdece049 (patch) | |
tree | 0052077652f6e67c1837efde950625a8894ab518 | |
parent | fbaa0827781be897a51b5d529cef305e569ca5cc (diff) | |
parent | 0e79232129f3a27305bc24141ff13dd54bc61e45 (diff) | |
download | coreclr-0ef1fc9aa3d65d41b5b9c8cd4911a1f8cdece049.tar.gz coreclr-0ef1fc9aa3d65d41b5b9c8cd4911a1f8cdece049.tar.bz2 coreclr-0ef1fc9aa3d65d41b5b9c8cd4911a1f8cdece049.zip |
Merge pull request #4803 from pgavlin/RootBinDir
Add a `bindir` parameter to build.sh.
-rwxr-xr-x | build.sh | 29 |
1 files changed, 24 insertions, 5 deletions
@@ -4,7 +4,7 @@ PYTHON=${PYTHON:-python} usage() { - echo "Usage: $0 [BuildArch] [BuildType] [clean] [verbose] [coverage] [cross] [clangx.y] [ninja] [configureonly] [skipconfigure] [skipnative] [skipmscorlib] [skiptests] [cmakeargs]" + echo "Usage: $0 [BuildArch] [BuildType] [clean] [verbose] [coverage] [cross] [clangx.y] [ninja] [configureonly] [skipconfigure] [skipnative] [skipmscorlib] [skiptests] [cmakeargs] [bindir]" echo "BuildArch can be: x64, x86, arm, arm-softfp, arm64" echo "BuildType can be: debug, checked, release" echo "clean - optional argument to force a clean build." @@ -22,6 +22,7 @@ usage() echo "disableoss - Disable Open Source Signing for mscorlib." echo "skipgenerateversion - disable version generation even if MSBuild is supported." echo "cmakeargs - user-settable additional arguments passed to CMake." + echo "bindir - output directory (defaults to $__ProjectRoot/bin)" exit 1 } @@ -271,7 +272,7 @@ build_mscorlib() echo "Commencing build of mscorlib components for $__BuildOS.$__BuildArch.$__BuildType" # Invoke MSBuild - $__ProjectRoot/Tools/corerun "$__MSBuildPath" /nologo "$__ProjectRoot/build.proj" /verbosity:minimal "/fileloggerparameters:Verbosity=normal;LogFile=$__LogsDir/MSCorLib_$__BuildOS__$__BuildArch__$__BuildType.log" /t:Build /p:__BuildOS=$__BuildOS /p:__BuildArch=$__BuildArch /p:__BuildType=$__BuildType /p:__IntermediatesDir=$__IntermediatesDir /p:BuildNugetPackage=false /p:UseSharedCompilation=false ${__SignTypeReal} + $__ProjectRoot/Tools/corerun "$__MSBuildPath" /nologo "$__ProjectRoot/build.proj" /verbosity:minimal "/fileloggerparameters:Verbosity=normal;LogFile=$__LogsDir/MSCorLib_$__BuildOS__$__BuildArch__$__BuildType.log" /t:Build /p:__BuildOS=$__BuildOS /p:__BuildArch=$__BuildArch /p:__BuildType=$__BuildType /p:__IntermediatesDir=$__IntermediatesDir /p:__RootBinDir=$__RootBinDir /p:BuildNugetPackage=false /p:UseSharedCompilation=false ${__SignTypeReal} if [ $? -ne 0 ]; then echo "Failed to build mscorlib." @@ -319,7 +320,7 @@ generate_NugetPackages() echo "Unable to generate Microsoft.NETCore.Runtime.CoreCLR nuget package since mscorlib was not built." else # Build the CoreCLR packages - $__ProjectRoot/Tools/corerun "$__MSBuildPath" /nologo "$__ProjectRoot/src/.nuget/Microsoft.NETCore.Runtime.CoreCLR/Microsoft.NETCore.Runtime.CoreCLR.builds" /verbosity:minimal "/fileloggerparameters:Verbosity=normal;LogFile=$__LogsDir/Nuget_$__BuildOS__$__BuildArch__$__BuildType.log" /t:Build /p:__BuildOS=$__BuildOS /p:__BuildArch=$__BuildArch /p:__BuildType=$__BuildType /p:__IntermediatesDir=$__IntermediatesDir /p:BuildNugetPackage=false /p:UseSharedCompilation=false + $__ProjectRoot/Tools/corerun "$__MSBuildPath" /nologo "$__ProjectRoot/src/.nuget/Microsoft.NETCore.Runtime.CoreCLR/Microsoft.NETCore.Runtime.CoreCLR.builds" /verbosity:minimal "/fileloggerparameters:Verbosity=normal;LogFile=$__LogsDir/Nuget_$__BuildOS__$__BuildArch__$__BuildType.log" /t:Build /p:__BuildOS=$__BuildOS /p:__BuildArch=$__BuildArch /p:__BuildType=$__BuildType /p:__IntermediatesDir=$__IntermediatesDir /p:__RootBinDir=$__RootBinDir /p:BuildNugetPackage=false /p:UseSharedCompilation=false if [ $? -ne 0 ]; then echo "Failed to generate Nuget packages." @@ -328,7 +329,7 @@ generate_NugetPackages() fi # Build the JIT packages - $__ProjectRoot/Tools/corerun "$__MSBuildPath" /nologo "$__ProjectRoot/src/.nuget/Microsoft.NETCore.Jit/Microsoft.NETCore.Jit.builds" /verbosity:minimal "/fileloggerparameters:Verbosity=normal;LogFile=$__LogsDir/Nuget_$__BuildOS__$__BuildArch__$__BuildType.log" /t:Build /p:__BuildOS=$__BuildOS /p:__BuildArch=$__BuildArch /p:__BuildType=$__BuildType /p:__IntermediatesDir=$__IntermediatesDir /p:BuildNugetPackage=false /p:UseSharedCompilation=false + $__ProjectRoot/Tools/corerun "$__MSBuildPath" /nologo "$__ProjectRoot/src/.nuget/Microsoft.NETCore.Jit/Microsoft.NETCore.Jit.builds" /verbosity:minimal "/fileloggerparameters:Verbosity=normal;LogFile=$__LogsDir/Nuget_$__BuildOS__$__BuildArch__$__BuildType.log" /t:Build /p:__BuildOS=$__BuildOS /p:__BuildArch=$__BuildArch /p:__BuildType=$__BuildType /p:__IntermediatesDir=$__IntermediatesDir /p:BuildNugetPackage=false /p:__RootBinDir=$__RootBinDir /p:UseSharedCompilation=false if [ $? -ne 0 ]; then echo "Failed to generate Nuget packages." @@ -428,7 +429,6 @@ __ProjectDir="$__ProjectRoot" __SourceDir="$__ProjectDir/src" __PackagesDir="$__ProjectDir/packages" __RootBinDir="$__ProjectDir/bin" -__LogsDir="$__RootBinDir/Logs" __UnprocessedBuildArgs= __MSBCleanBuildArgs= __UseNinja=0 @@ -583,6 +583,22 @@ while :; do fi ;; + bindir) + if [ -n "$2" ]; then + __RootBinDir="$2" + if [ ! -d $__RootBinDir ]; then + mkdir $__RootBinDir + fi + __RootBinParent=$(dirname $__RootBinDir) + __RootBinName=${__RootBinDir##*/} + __RootBinDir="$(cd $__RootBinParent &>/dev/null && printf %s/%s $PWD $__RootBinName)" + shift + else + echo "ERROR: 'bindir' requires a non-empty option argument" + exit 1 + fi + ;; + *) if [[ $1 == "/p:OfficialBuildId="* ]]; then __OfficialBuildIdArg=$1 @@ -595,6 +611,9 @@ while :; do shift done +# Set dependent variables +__LogsDir="$__RootBinDir/Logs" + if [[ $__ConfigureOnly == 1 && $__SkipConfigure == 1 ]]; then echo "configureonly and skipconfigure are mutually exclusive!" exit 1 |