-
Notifications
You must be signed in to change notification settings - Fork 810
/
Copy pathDotNetBuild.props
49 lines (42 loc) · 2.54 KB
/
DotNetBuild.props
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<!-- When altering this file, include @dotnet/product-construction as a reviewer. -->
<Project>
<PropertyGroup>
<GitHubRepositoryName>fsharp</GitHubRepositoryName>
<SourceBuildManagedOnly>true</SourceBuildManagedOnly>
</PropertyGroup>
<!--
The build script passes in the full path of the sln to build. This must be overridden in order to build
the cloned source in the inner build.
-->
<Target Name="ConfigureInnerBuildArg"
BeforeTargets="GetSourceBuildCommandConfiguration">
<PropertyGroup>
<InnerBuildArgs>$(InnerBuildArgs) /p:Projects="$(InnerSourceBuildRepoRoot)\Microsoft.FSharp.Compiler.sln"</InnerBuildArgs>
</PropertyGroup>
</Target>
<!--
The build script bootstraps some tooling for the build. Since the inner build is triggerred via msbuild,
trigger the bootstrapping for the inner build.
-->
<Target Name="BuildBootstrap"
DependsOnTargets="PrepareInnerSourceBuildRepoRoot"
BeforeTargets="RunInnerSourceBuildCommand"
Condition="'$(DotNetBuildSourceOnly)' == 'true'">
<PropertyGroup>
<SourceBuildBootstrapTfmArg Condition="$(SourceBuildBootstrapTfm) != ''">--tfm $(SourceBuildBootstrapTfm)</SourceBuildBootstrapTfmArg>
<DotNetBuildUseMonoRuntime Condition="'$(DotNetBuildUseMonoRuntime)' == ''">false</DotNetBuildUseMonoRuntime>
<SourceBuildBootstrapRestoreConfigFileArg Condition="'$(RestoreConfigFile)' != ''" >/p:RestoreConfigFile=$(RestoreConfigFile)</SourceBuildBootstrapRestoreConfigFileArg>
</PropertyGroup>
<!-- this runs the source-build bootstrap path as described in https://github.com/dotnet/fsharp/blob/95df49e380ea8dbf33653fa4209f89dba29413f5/eng/build.sh#L247
Note that we *are not* passing -source-build here so we do this bootstrap build in the outer build.
the important parts here are:
-bootstrap will build the "Proto" config of F# which includes tools and a bootstrap compiler
-skipBuild skips the rest of the build
-bl enables the binlogs for the tools and Proto builds, which make debugging failures here easier
-->
<Exec
Command="./build.sh --bootstrap --skipBuild -bl $(SourceBuildBootstrapTfmArg) $(SourceBuildBootstrapRestoreConfigFileArg) /p:DotNetBuildUseMonoRuntime=$(DotNetBuildUseMonoRuntime) /p:DotNetBuildSourceOnly=true /p:DotNetBuildInnerRepo=true /p:DotNetBuildRepo=true /p:DotNetBuildOrchestrator=$(DotNetBuildOrchestrator)"
WorkingDirectory="$(InnerSourceBuildRepoRoot)"
EnvironmentVariables="@(InnerBuildEnv)" />
</Target>
</Project>