Skip to content

Update to latest msbuild vs15.7_source-build branch #500

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
May 4, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
From c46510737402f30f28c23b06a0b309354f98e29a Mon Sep 17 00:00:00 2001
From: dseefeld <[email protected]>
Date: Thu, 3 May 2018 22:30:30 +0000
Subject: [PATCH] Update build.sh to uptake source-built repotoolset

---
build/build.sh | 30 ++++++++++++++++++++++++------
1 file changed, 24 insertions(+), 6 deletions(-)

diff --git a/build/build.sh b/build/build.sh
index 141f779..310cf85 100755
--- a/build/build.sh
+++ b/build/build.sh
@@ -278,19 +278,36 @@ function InstallDotNetCli {
}

function InstallRepoToolset {
+ CreateDirectory "$RepoToolsetDir"
ReadJson "$RepoRoot/global.json" "RoslynTools.RepoToolset"
RepoToolsetVersion=$readjsonvalue
- RepoToolsetDir="$NuGetPackageRoot/roslyntools.repotoolset/$RepoToolsetVersion/tools"
- RepoToolsetBuildProj="$RepoToolsetDir/Build.proj"
+ RepoToolsetLocationFile="$RepoToolsetDir/$RepoToolsetVersion.txt"
+
+ if [[ -a "$RepoToolsetLocationFile" ]]; then
+ local path=`cat $RepoToolsetLocationFile`
+ if [[ -a "$path" ]]; then
+ RepoToolsetBuildProj=$path
+ return
+ fi
+ fi
+ if [[ "$restore" != true ]]; then
+ ExitIfError 2 "Toolset version $RepoToolsetVersion has not been restored."
+ fi

echo "Using repo tools version: $readjsonvalue"
+ local proj="$RepoToolsetDir/restore.proj"
+ echo '<Project Sdk="RoslynTools.RepoToolset"/>' > $proj

local logCmd=$(GetLogCmd Toolset)
+ CallMSBuild $(QQ $proj) /t:__WriteToolsetLocation /m /nologo /clp:None /warnaserror $logCmd /p:__ToolsetLocationOutputFile=$RepoToolsetLocationFile
+ local lastexitcode=$?

- if [ ! -d "$RepoToolsetBuildProj" ]
- then
- local ToolsetProj="$ScriptRoot/Toolset.csproj"
- CallMSBuild $(QQ $ToolsetProj) /t:build /m /clp:Summary /warnaserror /v:$verbosity $logCmd $properties
+ ExitIfError $lastexitcode "Failed to restore toolset (exit code '$lastexitcode')."
+
+ RepoToolsetBuildProj=`cat $RepoToolsetLocationFile`
+
+ if [[ ! -a "$RepoToolsetBuildProj" ]]; then
+ ExitIfError 3 "Invalid toolset path: $RepoToolsetBuildProj"
fi
}

@@ -392,6 +409,7 @@ ArtifactsConfigurationDir="$ArtifactsDir/$configuration"
PackagesDir="$ArtifactsConfigurationDir/packages"
LogDir="$ArtifactsConfigurationDir/log"
VersionsProps="$ScriptRoot/Versions.props"
+RepoToolsetDir="$ArtifactsDir/toolset"

#https://github.com/dotnet/source-build
if $dotnetBuildFromSource
--
1.8.3.1

5 changes: 5 additions & 0 deletions repos/msbuild.proj
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,17 @@
<BuildCommand>$(ProjectDirectory)build/build$(ShellExtension) build -DotNetBuildFromSource -DotNetCoreSdkDir $(DotNetCliToolDir) -bootstraponly -skiptests -pack -configuration $(Configuration) /p:GitHeadSha=$(GitCommitHash) $(OutputVersionArgs)</BuildCommand>
<SourceOverrideRepoApiImplemented>true</SourceOverrideRepoApiImplemented>
<RepoApiImplemented>false</RepoApiImplemented>
<UsesRepoToolset>true</UsesRepoToolset>
<!--
MSBuild is part of ProdCon, but that branch doesn't build from source yet.
<OrchestratedManifestBuildName>Microsoft/msbuild</OrchestratedManifestBuildName>
-->
<OrchestratedManifestBuildName>N/A</OrchestratedManifestBuildName>
</PropertyGroup>

<ItemGroup>
<RepositoryReference Include="roslyn-tools" />
</ItemGroup>

<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))/dir.targets" />
</Project>
2 changes: 1 addition & 1 deletion src/msbuild