echo "-skipnuget - skip building nuget packages."
echo "-skiprestoreoptdata - skip restoring optimization data used by profile-based optimizations."
echo "-skipcrossgen - skip native image generation"
+ echo "-skipmanagedtools -- skip build tools such as R2Rdump and RunInContext"
echo "-crossgenonly - only run native image generation"
echo "-partialngen - build CoreLib as PartialNGen"
echo "-verbose - optional argument to enable verbose build output."
echo "-bindir - output directory (defaults to $__ProjectRoot/bin)"
echo "-msbuildonunsupportedplatform - build managed binaries even if distro is not officially supported."
echo "-numproc - set the number of build processes."
+ echo "-portablebuild - pass -portablebuild=false to force a non-portable build."
+ echo "-staticanalyzer - build with clang static analyzer enabled."
exit 1
}
-initHostDistroRid()
-{
- __HostDistroRid=""
- if [ "$__HostOS" == "Linux" ]; then
- if [ -e /etc/os-release ]; then
- source /etc/os-release
- if [[ $ID == "rhel" ]]; then
- # remove the last version digit
- VERSION_ID=${VERSION_ID%.*}
- fi
- __HostDistroRid="$ID.$VERSION_ID-$__HostArch"
- if [[ $ID == "alpine" ]]; then
- __HostDistroRid="linux-musl-$__HostArch"
- fi
- elif [ -e /etc/redhat-release ]; then
- local redhatRelease=$(</etc/redhat-release)
- if [[ $redhatRelease == "CentOS release 6."* || $redhatRelease == "Red Hat Enterprise Linux Server release 6."* ]]; then
- __HostDistroRid="rhel.6-$__HostArch"
- fi
- if [[ $redhatRelease == "CentOS Linux release 7."* ]]; then
- __HostDistroRid="rhel.7-$__Arch"
- fi
- fi
- fi
- if [ "$__HostOS" == "FreeBSD" ]; then
- __freebsd_version=`sysctl -n kern.osrelease | cut -f1 -d'.'`
- __HostDistroRid="freebsd.$__freebsd_version-$__HostArch"
- fi
-
- if [ "$__HostDistroRid" == "" ]; then
- echo "WARNING: Can not determine runtime id for current distro."
- fi
-}
-
initTargetDistroRid()
{
- if [ $__CrossBuild == 1 ]; then
- if [ "$__BuildOS" == "Linux" ]; then
- if [ ! -e $ROOTFS_DIR/etc/os-release ]; then
- if [ -e $ROOTFS_DIR/android_platform ]; then
- source $ROOTFS_DIR/android_platform
- export __DistroRid="$RID"
- else
- echo "WARNING: Can not determine runtime id for current distro."
- export __DistroRid=""
- fi
- else
- source $ROOTFS_DIR/etc/os-release
- export __DistroRid="$ID.$VERSION_ID-$__BuildArch"
- fi
- fi
- else
- export __DistroRid="$__HostDistroRid"
- fi
+ source init-distro-rid.sh
- if [ "$__BuildOS" == "OSX" ]; then
- __PortableBuild=1
- fi
+ local passedRootfsDir=""
- # Portable builds target the base RID
- if [ $__PortableBuild == 1 ]; then
- if [ "$__BuildOS" == "Linux" ]; then
- export __DistroRid="linux-$__BuildArch"
- elif [ "$__BuildOS" == "OSX" ]; then
- export __DistroRid="osx-$__BuildArch"
- elif [ "$__BuildOS" == "FreeBSD" ]; then
- export __DistroRid="freebsd-$__BuildArch"
- fi
+ # Only pass ROOTFS_DIR if cross is specified.
+ if (( ${__CrossBuild} == 1 )); then
+ passedRootfsDir=${ROOTFS_DIR}
+ #elif [ "${__BuildArch}" != "${__HostArch}" ]; then
+ # echo "Error, you are building a cross scenario without passing -cross."
+ # exit 1
fi
+
+ initDistroRidGlobal ${__BuildOS} ${__BuildArch} ${__PortableBuild} ${passedRootfsDir}
}
setup_dirs()
# we only need optdata on a Release build
if [[ "$__BuildType" != "Release" ]]; then __SkipRestoreOptData=1; fi
+ local OptDataProjectFilePath="$__ProjectRoot/src/.nuget/optdata/optdata.csproj"
if [[ ( $__SkipRestoreOptData == 0 ) && ( $__isMSBuildOnNETCoreSupported == 1 ) ]]; then
echo "Restoring the OptimizationData package"
- "$__ProjectRoot/dotnet.sh" msbuild /nologo /verbosity:minimal /clp:Summary \
- /p:RestoreDefaultOptimizationDataPackage=false /p:PortableBuild=true \
- /p:UsePartialNGENOptimization=false /maxcpucount \
- /t:RestoreOptData ./build.proj \
+ "$__ProjectRoot/dotnet.sh" restore /nologo /verbosity:minimal /clp:Summary /m \
+ $OptDataProjectFilePath \
$__CommonMSBuildArgs $__UnprocessedBuildArgs
if [ $? != 0 ]; then
echo "Failed to restore the optimization data package."
if [ $__isMSBuildOnNETCoreSupported == 1 ]; then
# Parse the optdata package versions out of msbuild so that we can pass them on to CMake
- local DotNetCli="$__ProjectRoot/Tools/dotnetcli/dotnet"
- if [ ! -f $DotNetCli ]; then
- source "$__ProjectRoot/init-tools.sh"
- if [ $? != 0 ]; then
- echo "Failed to restore buildtools."
- exit 1
- fi
+
+ local PgoDataPackageVersionOutputFile="${__IntermediatesDir}/optdataversion.txt"
+ local IbcDataPackageVersionOutputFile="${__IntermediatesDir}/ibcoptdataversion.txt"
+
+ # Writes into ${PgoDataPackageVersionOutputFile}
+ ${__ProjectDir}/dotnet.sh msbuild $OptDataProjectFilePath /t:DumpPgoDataPackageVersion ${__CommonMSBuildArgs} /p:PgoDataPackageVersionOutputFile=${PgoDataPackageVersionOutputFile} /nologo 2>&1 > /dev/null
+ if [ $? != 0 ] || [ ! -f "${PgoDataPackageVersionOutputFile}" ]; then
+ echo "Failed to get PGO data package version."
+ exit $?
+ fi
+
+ __PgoOptDataVersion=$(<"${PgoDataPackageVersionOutputFile}")
+
+ # Writes into ${IbcDataPackageVersionOutputFile}
+ ${__ProjectDir}/dotnet.sh msbuild $OptDataProjectFilePath /t:DumpIbcDataPackageVersion ${__CommonMSBuildArgs} /p:IbcDataPackageVersionOutputFile=${IbcDataPackageVersionOutputFile} /nologo 2>&1 > /dev/null
+ if [ $? != 0 ] || [ ! -f "${IbcDataPackageVersionOutputFile}" ]; then
+ echo "Failed to get IBC data package version."
+ exit $?
fi
- local OptDataProjectFilePath="$__ProjectRoot/src/.nuget/optdata/optdata.csproj"
- __PgoOptDataVersion=$(DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1 $DotNetCli msbuild $OptDataProjectFilePath /t:DumpPgoDataPackageVersion /nologo | sed 's/^\s*//')
- __IbcOptDataVersion=$(DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1 $DotNetCli msbuild $OptDataProjectFilePath /t:DumpIbcDataPackageVersion /nologo | sed 's/^[[:blank:]]*//')
+
+ __IbcOptDataVersion=$(<"${IbcDataPackageVersionOutputFile}")
fi
}
generate_event_logging_sources()
{
__OutputDir=$1
- __ConsumingBuildSystem=$2
-
- __OutputIncDir="$__OutputDir/src/inc"
__OutputEventingDir="$__OutputDir/Eventing"
- __OutputEventProviderDir="$__OutputEventingDir/eventprovider"
-
- echo "Laying out dynamically generated files consumed by $__ConsumingBuildSystem"
- echo "Laying out dynamically generated Event test files, etmdummy stub functions, and external linkages"
__PythonWarningFlags="-Wall"
if [[ $__IgnoreWarnings == 0 ]]; then
__PythonWarningFlags="$__PythonWarningFlags -Werror"
fi
- $PYTHON -B $__PythonWarningFlags "$__ProjectRoot/src/scripts/genEventing.py" --inc $__OutputIncDir --dummy $__OutputIncDir/etmdummy.h --man "$__ProjectRoot/src/vm/ClrEtwAll.man" --testdir "$__OutputEventProviderDir/tests"
- if [[ $? != 0 ]]; then
- exit 1
- fi
-
- echo "Laying out dynamically generated EventPipe Implementation"
- $PYTHON -B $__PythonWarningFlags "$__ProjectRoot/src/scripts/genEventPipe.py" --man "$__ProjectRoot/src/vm/ClrEtwAll.man" --intermediate "$__OutputEventingDir/eventpipe"
-
echo "Laying out dynamically generated EventSource classes"
$PYTHON -B $__PythonWarningFlags "$__ProjectRoot/src/scripts/genRuntimeEventSources.py" --man "$__ProjectRoot/src/vm/ClrEtwAll.man" --intermediate "$__OutputEventingDir"
-
- # determine the logging system
- case $__BuildOS in
- Linux|FreeBSD)
- echo "Laying out dynamically generated Event Logging Implementation of Lttng"
- $PYTHON -B $__PythonWarningFlags "$__ProjectRoot/src/scripts/genLttngProvider.py" --man "$__ProjectRoot/src/vm/ClrEtwAll.man" --intermediate "$__OutputEventProviderDir"
- if [[ $? != 0 ]]; then
- exit 1
- fi
- ;;
- *)
- echo "Laying out dummy event logging provider"
- $PYTHON -B $__PythonWarningFlags "$__ProjectRoot/src/scripts/genDummyProvider.py" --man "$__ProjectRoot/src/vm/ClrEtwAll.man" --intermediate "$__OutputEventProviderDir"
- if [[ $? != 0 ]]; then
- exit 1
- fi
- ;;
- esac
}
generate_event_logging()
{
# Event Logging Infrastructure
- if [[ $__SkipCoreCLR == 0 || $__SkipMSCorLib == 0 || $__ConfigureOnly == 1 ]]; then
- generate_event_logging_sources "$__IntermediatesDir" "the native build system"
+ if [[ $__SkipMSCorLib == 0 ]]; then
+ generate_event_logging_sources "$__IntermediatesDir"
fi
}
__versionSourceFile="$intermediatesForBuild/version.c"
if [ $__SkipGenerateVersion == 0 ]; then
pwd
- "$__ProjectRoot/dotnet.sh" msbuild /nologo /verbosity:minimal /clp:Summary \
- /l:BinClashLogger,Tools/Microsoft.DotNet.Build.Tasks.dll\;LogFile=binclash.log \
- /p:RestoreDefaultOptimizationDataPackage=false /p:PortableBuild=true \
- /p:UsePartialNGENOptimization=false /maxcpucount \
- "$__ProjectDir/build.proj" /p:GenerateVersionSourceFile=true /t:GenerateVersionSourceFile /p:NativeVersionSourceFile=$__versionSourceFile \
- $__CommonMSBuildArgs $__UnprocessedBuildArgs
+ "$__ProjectRoot/eng/common/msbuild.sh" $__ProjectRoot/eng/empty.csproj \
+ /p:NativeVersionFile=$__versionSourceFile \
+ /p:ArcadeBuild=true /t:GenerateNativeVersionFile /restore \
+ $__CommonMSBuildArgs $__UnprocessedBuildArgs
+ if [ $? -ne 0 ]; then
+ echo "Failed to generate native version file."
+ exit $?
+ fi
else
# Generate the dummy version.c, but only if it didn't exist to make sure we don't trigger unnecessary rebuild
__versionSourceLine="static char sccsid[] __attribute__((used)) = \"@(#)No version information produced\";"
pushd "$intermediatesForBuild"
# Regenerate the CMake solution
+ scriptDir="$__ProjectRoot/src/pal/tools"
if [[ $__GccBuild == 0 ]]; then
- echo "Invoking \"$__ProjectRoot/src/pal/tools/gen-buildsys-clang.sh\" \"$__ProjectRoot\" $__ClangMajorVersion \"$__ClangMinorVersion\" $platformArch $__BuildType $__CodeCoverage $generator $extraCmakeArguments $__cmakeargs"
- "$__ProjectRoot/src/pal/tools/gen-buildsys-clang.sh" "$__ProjectRoot" $__ClangMajorVersion "$__ClangMinorVersion" $platformArch $__BuildType $__CodeCoverage $generator "$extraCmakeArguments" "$__cmakeargs"
+ scan_build=
+ if [[ $__StaticAnalyzer == 1 ]]; then
+ scan_build=scan-build
+ fi
+ echo "Invoking \"$scriptDir/gen-buildsys-clang.sh\" \"$__ProjectRoot\" $__ClangMajorVersion \"$__ClangMinorVersion\" $platformArch "$scriptDir" $__BuildType $__CodeCoverage $scan_build $generator $extraCmakeArguments $__cmakeargs"
+ source "$scriptDir/gen-buildsys-clang.sh" "$__ProjectRoot" $__ClangMajorVersion "$__ClangMinorVersion" $platformArch "$scriptDir" $__BuildType $__CodeCoverage $scan_build $generator "$extraCmakeArguments" "$__cmakeargs"
else
- echo "Invoking \"$__ProjectRoot/src/pal/tools/gen-buildsys-gcc.sh\" \"$__ProjectRoot\" $__GccMajorVersion \"$__GccMinorVersion\" $platformArch $__BuildType $__CodeCoverage $generator $extraCmakeArguments $__cmakeargs"
- "$__ProjectRoot/src/pal/tools/gen-buildsys-gcc.sh" "$__ProjectRoot" "$__GccMajorVersion" "$__CGccMinorVersion" $platformArch $__BuildType $__CodeCoverage $generator "$extraCmakeArguments" "$__cmakeargs"
+ echo "Invoking \"$scriptDir/gen-buildsys-gcc.sh\" \"$__ProjectRoot\" $__GccMajorVersion \"$__GccMinorVersion\" $platformArch "$scriptDir" $__BuildType $__CodeCoverage $generator $extraCmakeArguments $__cmakeargs"
+ source "$scriptDir/gen-buildsys-gcc.sh" "$__ProjectRoot" "$__GccMajorVersion" "$__CGccMinorVersion" $platformArch "$scriptDir" $__BuildType $__CodeCoverage $generator "$extraCmakeArguments" "$__cmakeargs"
fi
popd
fi
# Check that the makefiles were created.
pushd "$intermediatesForBuild"
+ if [ $__StaticAnalyzer == 1 ]; then
+ buildTool="$SCAN_BUILD_COMMAND $buildTool"
+ fi
+
echo "Executing $buildTool install -j $__NumProc"
$buildTool install -j $__NumProc
if [ "$__HostOS" == "Linux" ]; then
__isMSBuildOnNETCoreSupported=1
# note: the RIDs below can use globbing patterns
- UNSUPPORTED_RIDS=("debian.9-x64" "ubuntu.17.04-x64")
+ UNSUPPORTED_RIDS=("ubuntu.17.04-x64")
for UNSUPPORTED_RID in "${UNSUPPORTED_RIDS[@]}"
do
- if [[ $__HostDistroRid == $UNSUPPORTED_RID ]]; then
+ if [[ ${__DistroRid} == $UNSUPPORTED_RID ]]; then
__isMSBuildOnNETCoreSupported=0
break
fi
build_CoreLib_ni()
{
local __CrossGenExec=$1
+ local __CoreLibILDir=$2
if [ $__PartialNgen == 1 ]; then
export COMPlus_PartialNGen=1
rm $__CrossGenCoreLibLog
fi
echo "Generating native image of System.Private.CoreLib.dll for $__BuildOS.$__BuildArch.$__BuildType. Logging to \"$__CrossGenCoreLibLog\"."
- echo "$__CrossGenExec /Platform_Assemblies_Paths $__BinDir/IL $__IbcTuning /out $__BinDir/System.Private.CoreLib.dll $__BinDir/IL/System.Private.CoreLib.dll"
- $__CrossGenExec /Platform_Assemblies_Paths $__BinDir/IL $__IbcTuning /out $__BinDir/System.Private.CoreLib.dll $__BinDir/IL/System.Private.CoreLib.dll >> $__CrossGenCoreLibLog 2>&1
+ echo "$__CrossGenExec /Platform_Assemblies_Paths $__CoreLibILDir $__IbcTuning /out $__BinDir/System.Private.CoreLib.dll $__CoreLibILDir/System.Private.CoreLib.dll"
+ $__CrossGenExec /Platform_Assemblies_Paths $__CoreLibILDir $__IbcTuning /out $__BinDir/System.Private.CoreLib.dll $__CoreLibILDir/System.Private.CoreLib.dll >> $__CrossGenCoreLibLog 2>&1
if [ $? -ne 0 ]; then
echo "Failed to generate native image for System.Private.CoreLib. Refer to $__CrossGenCoreLibLog"
exit 1
__ExtraBuildArgs="$__ExtraBuildArgs /p:BuildManagedTools=true"
fi
+ $__ProjectRoot/dotnet.sh restore /nologo /verbosity:minimal /clp:Summary \
+ /p:PortableBuild=true /maxcpucount /p:IncludeRestoreOnlyProjects=true /p:ArcadeBuild=true\
+ $__ProjectDir/src/build.proj \
+ /flp:Verbosity=normal\;LogFile=$__LogsDir/System.Private.CoreLib_$__BuildOS__$__BuildArch__$__BuildType.log \
+ /p:__IntermediatesDir=$__IntermediatesDir /p:__RootBinDir=$__RootBinDir \
+ $__CommonMSBuildArgs $__ExtraBuildArgs $__UnprocessedBuildArgs
+
+ if [ $? -ne 0 ]; then
+ echo "Failed to restore managed components."
+ exit 1
+ fi
+
$__ProjectRoot/dotnet.sh msbuild /nologo /verbosity:minimal /clp:Summary \
- /l:BinClashLogger,Tools/Microsoft.DotNet.Build.Tasks.dll\;LogFile=binclash.log \
- /p:RestoreDefaultOptimizationDataPackage=false /p:PortableBuild=true \
- /p:UsePartialNGENOptimization=false /maxcpucount \
- $__ProjectDir/build.proj \
+ /p:PortableBuild=true /maxcpucount /p:ArcadeBuild=true\
+ $__ProjectDir/src/build.proj \
/flp:Verbosity=normal\;LogFile=$__LogsDir/System.Private.CoreLib_$__BuildOS__$__BuildArch__$__BuildType.log \
- /p:__IntermediatesDir=$__IntermediatesDir /p:__RootBinDir=$__RootBinDir /p:BuildNugetPackage=false /p:UseSharedCompilation=false \
+ /p:__IntermediatesDir=$__IntermediatesDir /p:__RootBinDir=$__RootBinDir \
$__CommonMSBuildArgs $__ExtraBuildArgs $__UnprocessedBuildArgs
if [ $? -ne 0 ]; then
exit 1
fi
+ local __CoreLibILDir=$__BinDir/IL
+
if [ $__SkipCrossgen == 1 ]; then
echo "Skipping generating native image"
+
+ #if [ $__CrossBuild == 1 ]; then
+ # Crossgen not performed, so treat the IL version as the final version
+ cp $__CoreLibILDir/System.Private.CoreLib.dll $__BinDir/System.Private.CoreLib.dll
+ #fi
+
return
fi
# The architecture of host pc must be same architecture with target.
if [[ ( "$__HostArch" == "$__BuildArch" ) ]]; then
- build_CoreLib_ni "$__BinDir/crossgen"
+ build_CoreLib_ni "$__BinDir/crossgen" $__CoreLibILDir
elif [[ ( "$__HostArch" == "x64" ) && ( "$__BuildArch" == "x86" ) ]]; then
- build_CoreLib_ni "$__BinDir/crossgen"
+ build_CoreLib_ni "$__BinDir/crossgen" $__CoreLibILDir
elif [[ ( "$__HostArch" == "arm64" ) && ( "$__BuildArch" == "arm" ) ]]; then
- build_CoreLib_ni "$__BinDir/crossgen"
+ build_CoreLib_ni "$__BinDir/crossgen" $__CoreLibILDir
else
exit 1
fi
else
if [[ ( "$__CrossArch" == "x86" ) && ( "$__BuildArch" == "arm" ) ]]; then
- build_CoreLib_ni "$__CrossComponentBinDir/crossgen"
+ build_CoreLib_ni "$__CrossComponentBinDir/crossgen" $__CoreLibILDir
elif [[ ( "$__CrossArch" == "x64" ) && ( "$__BuildArch" == "arm" ) ]]; then
- build_CoreLib_ni "$__CrossComponentBinDir/crossgen"
+ build_CoreLib_ni "$__CrossComponentBinDir/crossgen" $__CoreLibILDir
elif [[ ( "$__HostArch" == "x64" ) && ( "$__BuildArch" == "arm64" ) ]]; then
- build_CoreLib_ni "$__CrossComponentBinDir/crossgen"
+ build_CoreLib_ni "$__CrossComponentBinDir/crossgen" $__CoreLibILDir
+ else
+ # Crossgen not performed, so treat the IL version as the final version
+ cp $__CoreLibILDir/System.Private.CoreLib.dll $__BinDir/System.Private.CoreLib.dll
fi
fi
}
echo "DistroRid is "$__DistroRid
echo "ROOTFS_DIR is "$ROOTFS_DIR
# Build the packages
- $__ProjectRoot/dotnet.sh msbuild /nologo /verbosity:minimal /clp:Summary \
- /l:BinClashLogger,Tools/Microsoft.DotNet.Build.Tasks.dll\;LogFile=binclash.log \
- /p:RestoreDefaultOptimizationDataPackage=false /p:PortableBuild=true \
- /p:UsePartialNGENOptimization=false /maxcpucount \
- $__SourceDir/.nuget/packages.builds \
- /flp:Verbosity=normal\;LogFile=$__LogsDir/Nuget_$__BuildOS__$__BuildArch__$__BuildType.log \
- /p:__IntermediatesDir=$__IntermediatesDir /p:__RootBinDir=$__RootBinDir /p:BuildNugetPackages=false /p:UseSharedCompilation=false /p:__DoCrossArchBuild=$__CrossBuild \
- $__CommonMSBuildArgs $__UnprocessedBuildArgs
+ # Package build uses the Arcade system and scripts, relying on it to restore required toolsets as part of build
+ $__ProjectRoot/eng/common/build.sh -r -b -projects $__SourceDir/.nuget/packages.builds \
+ -verbosity minimal -bl:$__LogsDir/Nuget_$__BuildOS__$__BuildArch__$__BuildType.binlog \
+ /p:PortableBuild=true /p:ArcadeBuild=true \
+ /p:__IntermediatesDir=$__IntermediatesDir /p:__RootBinDir=$__RootBinDir /p:__DoCrossArchBuild=$__CrossBuild \
+ $__CommonMSBuildArgs $__UnprocessedBuildArgs
if [ $? -ne 0 ]; then
echo "Failed to generate Nuget packages."
# Set the various build properties here so that CMake and MSBuild can pick them up
__ProjectDir="$__ProjectRoot"
__SourceDir="$__ProjectDir/src"
-__PackagesDir="${DotNetRestorePackagesPath:-${__ProjectDir}/packages}"
+__PackagesDir="${DotNetRestorePackagesPath:-${__ProjectDir}/.packages}"
__RootBinDir="$__ProjectDir/bin"
__UnprocessedBuildArgs=
__CommonMSBuildArgs=
__GccMajorVersion=0
__GccMinorVersion=0
__NuGetPath="$__PackagesDir/NuGet.exe"
-__HostDistroRid=""
__DistroRid=""
__cmakeargs=""
__SkipGenerateVersion=0
__PgoOptDataVersion=""
__IbcOptDataVersion=""
__BuildManagedTools=1
-__SkipRestoreArg=""
+__SkipRestoreArg="/p:RestoreDuringBuild=true"
__SignTypeArg=""
__OfficialBuildIdArg=""
+__StaticAnalyzer=0
# Get the number of processors available to the scheduler
# Other techniques such as `nproc` only get the number of
__GccBuild=1
;;
+ gcc6|-gcc6)
+ __GccMajorVersion=6
+ __GccMinorVersion=
+ __GccBuild=1
+ ;;
+
gcc7|-gcc7)
__GccMajorVersion=7
__GccMinorVersion=
__GccBuild=1
;;
+ gcc8|-gcc8)
+ __GccMajorVersion=8
+ __GccMinorVersion=
+ __GccBuild=1
+ ;;
+
gcc|-gcc)
__GccMajorVersion=
__GccMinorVersion=
__SkipCrossgen=1
;;
+ skipmanagedtools | -skipmanagedtools)
+ __BuildManagedTools=0
+ ;;
+
crossgenonly|-crossgenonly)
__SkipMSCorLib=1
__SkipCoreCLR=1
__OfficialBuildIdArg="/p:OfficialBuildId=$__Id"
;;
+ -staticanalyzer)
+ __StaticAnalyzer=1
+ ;;
+
--)
# Skip -Option=Value style argument passing
;;
shift
done
-__CommonMSBuildArgs="/p:__BuildArch=$__BuildArch /p:__BuildType=$__BuildType /p:__BuildOS=$__BuildOS $__OfficialBuildIdArg $__SignTypeArg $__SkipRestoreArg"
+__CommonMSBuildArgs="/p:__BuildArch=$__BuildArch /p:__BuildType=$__BuildType /p:__BuildOS=$__BuildOS /nodeReuse:false $__OfficialBuildIdArg $__SignTypeArg $__SkipRestoreArg"
# Configure environment if we are doing a verbose build
if [ $__VerboseBuild == 1 ]; then
fi
fi
-if [[ "$__BuildArch" == "armel" ]]; then
- # Armel cross build is Tizen specific and does not support Portable RID build
- __PortableBuild=0
-fi
-
-if [ $__PortableBuild == 0 ]; then
- __CommonMSBuildArgs="$__CommonMSBuildArgs /p:PortableBuild=false"
-fi
-
# Set dependent variables
__LogsDir="$__RootBinDir/Logs"
__MsbuildDebugLogsDir="$__LogsDir/MsbuildDebugLogs"
-# init the host distro name
-initHostDistroRid
-
# Set the remaining variables based upon the determined build configuration
__BinDir="$__RootBinDir/Product/$__BuildOS.$__BuildArch.$__BuildType"
__PackagesBinDir="$__BinDir/.nuget"
-__ToolsDir="$__RootBinDir/tools"
-__TestWorkingDir="$__RootBinDir/tests/$__BuildOS.$__BuildArch.$__BuildType"
export __IntermediatesDir="$__RootBinDir/obj/$__BuildOS.$__BuildArch.$__BuildType"
-__TestIntermediatesDir="$__RootBinDir/tests/obj/$__BuildOS.$__BuildArch.$__BuildType"
__isMSBuildOnNETCoreSupported=0
__CrossComponentBinDir="$__BinDir"
fi
__CrossGenCoreLibLog="$__LogsDir/CrossgenCoreLib_$__BuildOS.$__BuildArch.$__BuildType.log"
+# Configure environment if we are doing a cross compile.
+if [ $__CrossBuild == 1 ]; then
+ export CROSSCOMPILE=1
+ if ! [[ -n "$ROOTFS_DIR" ]]; then
+ export ROOTFS_DIR="$__ProjectRoot/cross/rootfs/$__BuildArch"
+ fi
+fi
+
+# init the target distro name
+initTargetDistroRid
+
+if [ $__PortableBuild == 0 ]; then
+ __CommonMSBuildArgs="$__CommonMSBuildArgs /p:PortableBuild=false"
+fi
+
# Init if MSBuild for .NET Core is supported for this platform
isMSBuildOnNETCoreSupported
# This is where all built CoreClr libraries will copied to.
export __CMakeBinDir="$__BinDir"
-# Configure environment if we are doing a cross compile.
-if [ $__CrossBuild == 1 ]; then
- export CROSSCOMPILE=1
- if ! [[ -n "$ROOTFS_DIR" ]]; then
- export ROOTFS_DIR="$__ProjectRoot/cross/rootfs/$__BuildArch"
- fi
-fi
-
-# init the target distro name
-initTargetDistroRid
-
# Make the directories necessary for build if they don't exist
setup_dirs