@@ -237,16 +237,30 @@ function Make-BootstrapBuild() {
237237 Create- Directory $dir
238238
239239 # prepare FsLex and Fsyacc and AssemblyCheck
240- Run- MSBuild " $RepoRoot \src\buildtools\buildtools.proj" " /restore /t:Publish /p:PublishWindowsPdb=false" - logFileName " BuildTools" - configuration $bootstrapConfiguration
241- Copy-Item " $ArtifactsDir \bin\fslex\$bootstrapConfiguration \netcoreapp3.0\publish" - Destination " $dir \fslex" - Force - Recurse
242- Copy-Item " $ArtifactsDir \bin\fsyacc\$bootstrapConfiguration \netcoreapp3.0\publish" - Destination " $dir \fsyacc" - Force - Recurse
243- Copy-Item " $ArtifactsDir \bin\AssemblyCheck\$bootstrapConfiguration \netcoreapp3.0\publish" - Destination " $dir \AssemblyCheck" - Force - Recurse
240+ $dotnetPath = InitializeDotNetCli
241+ $dotnetExe = Join-Path $dotnetPath " dotnet.exe"
242+ $buildToolsProject = " $RepoRoot \src\buildtools\buildtools.proj"
243+
244+ $argNoRestore = if ($norestore ) { " --no-restore" } else { " " }
245+ $argNoIncremental = if ($rebuild ) { " --no-incremental" } else { " " }
246+
247+ $args = " build $buildToolsProject -c $bootstrapConfiguration -v $verbosity -f netcoreapp3.0" + $argNoRestore + $argNoIncremental
248+ Exec- Console $dotnetExe $args
249+
250+ Copy-Item " $ArtifactsDir \bin\fslex\$bootstrapConfiguration \netcoreapp3.0" - Destination " $dir \fslex" - Force - Recurse
251+ Copy-Item " $ArtifactsDir \bin\fsyacc\$bootstrapConfiguration \netcoreapp3.0" - Destination " $dir \fsyacc" - Force - Recurse
252+ Copy-Item " $ArtifactsDir \bin\AssemblyCheck\$bootstrapConfiguration \netcoreapp3.0" - Destination " $dir \AssemblyCheck" - Force - Recurse
244253
245254 # prepare compiler
246- $projectPath = " $RepoRoot \proto.proj"
247- Run- MSBuild $projectPath " /restore /t:Publish /p:TargetFramework=$bootstrapTfm ;ProtoTargetFramework=$bootstrapTfm /p:PublishWindowsPdb=false" - logFileName " Bootstrap" - configuration $bootstrapConfiguration
248- Copy-Item " $ArtifactsDir \bin\fsc\$bootstrapConfiguration \$bootstrapTfm \publish" - Destination " $dir \fsc" - Force - Recurse
249- Copy-Item " $ArtifactsDir \bin\fsi\$bootstrapConfiguration \$bootstrapTfm \publish" - Destination " $dir \fsi" - Force - Recurse
255+ $protoProject = " $RepoRoot \proto.proj"
256+ $args = " build $protoProject -c $bootstrapConfiguration -v $verbosity -f $bootstrapTfm " + $argNoRestore + $argNoIncremental
257+ Exec- Console $dotnetExe $args
258+
259+ Copy-Item " $ArtifactsDir \bin\fsc\$bootstrapConfiguration \$bootstrapTfm " - Destination " $dir \fsc" - Force - Recurse
260+ Copy-Item " $ArtifactsDir \bin\fsi\$bootstrapConfiguration \$bootstrapTfm " - Destination " $dir \fsi" - Force - Recurse
250261
251262 return $dir
252263}
264+
265+
266+
0 commit comments