diff options
author | jashook <jashoo@microsoft.com> | 2019-06-12 22:16:40 +0000 |
---|---|---|
committer | jashook <jashoo@microsoft.com> | 2019-06-12 22:16:40 +0000 |
commit | ff5f14a7c3440ab918beb3aa5b1b14ec1dbaad68 (patch) | |
tree | 6497039bc8893d7bc8de44ba32ed88a803886f1c /build.sh | |
parent | 938383a60ffbb716e01dbbf941a239d4bfa7aaf6 (diff) | |
download | coreclr-ff5f14a7c3440ab918beb3aa5b1b14ec1dbaad68.tar.gz coreclr-ff5f14a7c3440ab918beb3aa5b1b14ec1dbaad68.tar.bz2 coreclr-ff5f14a7c3440ab918beb3aa5b1b14ec1dbaad68.zip |
Change how build.sh/build.cmd parse the PGO and IBC versions
This will reduce fragility in our build pipeline, by explicitely controlling the output of dotnet msbuild. It also unblocks the source-build effort, as source-build will write extra console output breaking our old parsing.
Diffstat (limited to 'build.sh')
-rwxr-xr-x | build.sh | 21 |
1 files changed, 11 insertions, 10 deletions
@@ -151,22 +151,23 @@ restore_optdata() if [ $__isMSBuildOnNETCoreSupported == 1 ]; then # Parse the optdata package versions out of msbuild so that we can pass them on to CMake - # Init dotnet - source "${__ProjectRoot}/init-dotnet.sh" - local DotNetCli=${_InitializeDotNetCli}/dotnet - - __PgoOptDataVersion=$(DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1 $DotNetCli msbuild $OptDataProjectFilePath /t:DumpPgoDataPackageVersion /nologo) - if [ $? != 0 ]; then + # Writes into ${__IntermediatesDir}/optdataversion.txt + ${__ProjectDir}/dotnet.sh msbuild $OptDataProjectFilePath /t:DumpPgoDataPackageVersion /nologo 2>&1 >/dev/null + if [ ! -f "${__IntermediatesDir}/optdataversion.txt" ]; then echo "Failed to get PGO data package version." exit $? fi - __PgoOptDataVersion=$(echo $__PgoOptDataVersion | sed 's/^\s*//') - __IbcOptDataVersion=$(DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1 $DotNetCli msbuild $OptDataProjectFilePath /t:DumpIbcDataPackageVersion /nologo) - if [ $? != 0 ]; then + + __PgoOptDataVersion=$(<"${__IntermediatesDir}/optdataversion.txt") + + # Writes into ${__IntermediatesDir}/ibcoptdataversion.txt + ${__ProjectDir}/dotnet.sh msbuild $OptDataProjectFilePath /t:DumpIbcDataPackageVersion /nologo 2>&1 >/dev/null + if [ ! -f "${__IntermediatesDir}/ibcoptdataversion.txt" ]; then echo "Failed to get IBC data package version." exit $? fi - __IbcOptDataVersion=$(echo $__IbcOptDataVersion | sed 's/^[[:blank:]]*//') + + __IbcOptDataVersion=$(<"${__IntermediatesDir}/ibcoptdataversion.txt") fi } |