Skip to content

Commit fe4ae4b

Browse files
authored
Update to latest msbuild vs15.7_source-build branch (#500)
* Update to latest msbuild vs15.7_source-build branch * Add repotoolset params to msbuild.proj * Remove global.json: MSBuild's has no SDK version * Update build.sh to uptake source-built repotoolset
1 parent 4654d68 commit fe4ae4b

4 files changed

+73
-27
lines changed

patches/msbuild/0001-Update-RoslynTools-verison-to-msbuild-specific-versi.patch

Lines changed: 0 additions & 26 deletions
This file was deleted.
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
From c46510737402f30f28c23b06a0b309354f98e29a Mon Sep 17 00:00:00 2001
2+
From: dseefeld <[email protected]>
3+
Date: Thu, 3 May 2018 22:30:30 +0000
4+
Subject: [PATCH] Update build.sh to uptake source-built repotoolset
5+
6+
---
7+
build/build.sh | 30 ++++++++++++++++++++++++------
8+
1 file changed, 24 insertions(+), 6 deletions(-)
9+
10+
diff --git a/build/build.sh b/build/build.sh
11+
index 141f779..310cf85 100755
12+
--- a/build/build.sh
13+
+++ b/build/build.sh
14+
@@ -278,19 +278,36 @@ function InstallDotNetCli {
15+
}
16+
17+
function InstallRepoToolset {
18+
+ CreateDirectory "$RepoToolsetDir"
19+
ReadJson "$RepoRoot/global.json" "RoslynTools.RepoToolset"
20+
RepoToolsetVersion=$readjsonvalue
21+
- RepoToolsetDir="$NuGetPackageRoot/roslyntools.repotoolset/$RepoToolsetVersion/tools"
22+
- RepoToolsetBuildProj="$RepoToolsetDir/Build.proj"
23+
+ RepoToolsetLocationFile="$RepoToolsetDir/$RepoToolsetVersion.txt"
24+
+
25+
+ if [[ -a "$RepoToolsetLocationFile" ]]; then
26+
+ local path=`cat $RepoToolsetLocationFile`
27+
+ if [[ -a "$path" ]]; then
28+
+ RepoToolsetBuildProj=$path
29+
+ return
30+
+ fi
31+
+ fi
32+
+ if [[ "$restore" != true ]]; then
33+
+ ExitIfError 2 "Toolset version $RepoToolsetVersion has not been restored."
34+
+ fi
35+
36+
echo "Using repo tools version: $readjsonvalue"
37+
+ local proj="$RepoToolsetDir/restore.proj"
38+
+ echo '<Project Sdk="RoslynTools.RepoToolset"/>' > $proj
39+
40+
local logCmd=$(GetLogCmd Toolset)
41+
+ CallMSBuild $(QQ $proj) /t:__WriteToolsetLocation /m /nologo /clp:None /warnaserror $logCmd /p:__ToolsetLocationOutputFile=$RepoToolsetLocationFile
42+
+ local lastexitcode=$?
43+
44+
- if [ ! -d "$RepoToolsetBuildProj" ]
45+
- then
46+
- local ToolsetProj="$ScriptRoot/Toolset.csproj"
47+
- CallMSBuild $(QQ $ToolsetProj) /t:build /m /clp:Summary /warnaserror /v:$verbosity $logCmd $properties
48+
+ ExitIfError $lastexitcode "Failed to restore toolset (exit code '$lastexitcode')."
49+
+
50+
+ RepoToolsetBuildProj=`cat $RepoToolsetLocationFile`
51+
+
52+
+ if [[ ! -a "$RepoToolsetBuildProj" ]]; then
53+
+ ExitIfError 3 "Invalid toolset path: $RepoToolsetBuildProj"
54+
fi
55+
}
56+
57+
@@ -392,6 +409,7 @@ ArtifactsConfigurationDir="$ArtifactsDir/$configuration"
58+
PackagesDir="$ArtifactsConfigurationDir/packages"
59+
LogDir="$ArtifactsConfigurationDir/log"
60+
VersionsProps="$ScriptRoot/Versions.props"
61+
+RepoToolsetDir="$ArtifactsDir/toolset"
62+
63+
#https://github.com/dotnet/source-build
64+
if $dotnetBuildFromSource
65+
--
66+
1.8.3.1
67+

repos/msbuild.proj

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,17 @@
1010
<BuildCommand>$(ProjectDirectory)build/build$(ShellExtension) build -DotNetBuildFromSource -DotNetCoreSdkDir $(DotNetCliToolDir) -bootstraponly -skiptests -pack -configuration $(Configuration) /p:GitHeadSha=$(GitCommitHash) $(OutputVersionArgs)</BuildCommand>
1111
<SourceOverrideRepoApiImplemented>true</SourceOverrideRepoApiImplemented>
1212
<RepoApiImplemented>false</RepoApiImplemented>
13+
<UsesRepoToolset>true</UsesRepoToolset>
1314
<!--
1415
MSBuild is part of ProdCon, but that branch doesn't build from source yet.
1516
<OrchestratedManifestBuildName>Microsoft/msbuild</OrchestratedManifestBuildName>
1617
-->
1718
<OrchestratedManifestBuildName>N/A</OrchestratedManifestBuildName>
1819
</PropertyGroup>
1920

21+
<ItemGroup>
22+
<RepositoryReference Include="roslyn-tools" />
23+
</ItemGroup>
24+
2025
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))/dir.targets" />
2126
</Project>

src/msbuild

0 commit comments

Comments
 (0)