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."
# 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
+ #elif [ "${__BuildArch}" != "${__HostArch}" ]; then
+ # echo "Error, you are building a cross scenario without passing -cross."
+ # exit 1
fi
initDistroRidGlobal ${__BuildOS} ${__BuildArch} ${__PortableBuild} ${passedRootfsDir}
if [ $__isMSBuildOnNETCoreSupported == 1 ]; then
# Parse the optdata package versions out of msbuild so that we can pass them on to CMake
- # Writes into ${__IntermediatesDir}/optdataversion.txt
- ${__ProjectDir}/dotnet.sh msbuild $OptDataProjectFilePath /t:DumpPgoDataPackageVersion /nologo 2>&1 >/dev/null
- if [ ! -f "${__IntermediatesDir}/optdataversion.txt" ]; then
+ 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=$(<"${__IntermediatesDir}/optdataversion.txt")
+ __PgoOptDataVersion=$(<"${PgoDataPackageVersionOutputFile}")
- # Writes into ${__IntermediatesDir}/ibcoptdataversion.txt
- ${__ProjectDir}/dotnet.sh msbuild $OptDataProjectFilePath /t:DumpIbcDataPackageVersion /nologo 2>&1 >/dev/null
- if [ ! -f "${__IntermediatesDir}/ibcoptdataversion.txt" ]; then
+ # 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
- __IbcOptDataVersion=$(<"${__IntermediatesDir}/ibcoptdataversion.txt")
+ __IbcOptDataVersion=$(<"${IbcDataPackageVersionOutputFile}")
fi
}
if [ $__SkipCrossgen == 1 ]; then
echo "Skipping generating native image"
- if [ $__CrossBuild == 1 ]; then
+ #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
+ #fi
return
fi
__SkipCrossgen=1
;;
+ skipmanagedtools | -skipmanagedtools)
+ __BuildManagedTools=0
+ ;;
+
crossgenonly|-crossgenonly)
__SkipMSCorLib=1
__SkipCoreCLR=1
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