summaryrefslogtreecommitdiff
path: root/build.sh
diff options
context:
space:
mode:
authorDaniel Podder <dapodd@microsoft.com>2017-07-10 11:37:25 -0700
committerGitHub <noreply@github.com>2017-07-10 11:37:25 -0700
commitaa63b76ac1c64b78f20edff35708477f3afac713 (patch)
tree5cf8cafc3ac54ca8ce88a52a0db099386ec89f86 /build.sh
parent28258cea0d6a7cfce257c9142a149d2d69f88efc (diff)
downloadcoreclr-aa63b76ac1c64b78f20edff35708477f3afac713.tar.gz
coreclr-aa63b76ac1c64b78f20edff35708477f3afac713.tar.bz2
coreclr-aa63b76ac1c64b78f20edff35708477f3afac713.zip
Fix optdata bootstrap test script & Linux skiprestoreoptdata behavior (#12541)
Fixes #12171. * bootstrap.py was printing an improperly-cased path to put PGO/IBC training data, which breaks on case-sensitive file systems, i.e., on Linux. * On Linux, `skiprestoreoptdata` was improperly skipping PGO even if optdata was already present due to some of the conditional checks in build.sh. This cleans that up to better match the intent of the switch, and to fix Linux behavior to better match Windows.
Diffstat (limited to 'build.sh')
-rwxr-xr-xbuild.sh13
1 files changed, 8 insertions, 5 deletions
diff --git a/build.sh b/build.sh
index 55483ce0f1..465b8fb464 100755
--- a/build.sh
+++ b/build.sh
@@ -141,24 +141,27 @@ check_prereqs()
restore_optdata()
{
- # if msbuild is not supported, then set __SkipRestoreOptData to 1
- if [ $__isMSBuildOnNETCoreSupported == 0 ]; then __SkipRestoreOptData=1; fi
# we only need optdata on a Release build
if [[ "$__BuildType" != "Release" ]]; then __SkipRestoreOptData=1; fi
- if [ $__SkipRestoreOptData == 0 ]; then
+ if [[ ( $__SkipRestoreOptData == 0 ) && ( $__isMSBuildOnNETCoreSupported == 1 ) ]]; then
echo "Restoring the OptimizationData package"
"$__ProjectRoot/run.sh" sync -optdata
if [ $? != 0 ]; then
echo "Failed to restore the optimization data package."
exit 1
fi
+ fi
+ 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
- echo "Assertion failed: dotnet CLI not found at '$DotNetCli'"
- exit 1
+ "$__ProjectRoot/init-tools.sh"
+ if [ $? != 0 ]; then
+ echo "Failed to restore buildtools."
+ exit 1
+ fi
fi
local OptDataProjectFilePath="$__ProjectRoot/src/.nuget/optdata/optdata.csproj"
__PgoOptDataVersion=$($DotNetCli msbuild $OptDataProjectFilePath /t:DumpPgoDataPackageVersion /nologo | sed 's/^\s*//')