diff options
author | Daniel Podder <dapodd@microsoft.com> | 2017-07-10 11:37:25 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-10 11:37:25 -0700 |
commit | aa63b76ac1c64b78f20edff35708477f3afac713 (patch) | |
tree | 5cf8cafc3ac54ca8ce88a52a0db099386ec89f86 /build.sh | |
parent | 28258cea0d6a7cfce257c9142a149d2d69f88efc (diff) | |
download | coreclr-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-x | build.sh | 13 |
1 files changed, 8 insertions, 5 deletions
@@ -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*//') |