-
Notifications
You must be signed in to change notification settings - Fork 1.1k
/
tool_fsc.csproj
60 lines (55 loc) · 3.54 KB
/
tool_fsc.csproj
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
50
51
52
53
54
55
56
57
58
59
60
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<TargetFramework>$(SdkTargetFramework)</TargetFramework>
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
<ServerGarbageCollection>true</ServerGarbageCollection>
</PropertyGroup>
<!-- MIBC, PGO -->
<Import Project="..\redist\targets\GetRuntimeInformation.targets" /> <!-- Rid is set here -->
<PropertyGroup>
<MibcPath>$(PkgMicrosoft_FSharp_Compiler)/contentFiles/mibc</MibcPath>
<MibcRid>$(Rid)</MibcRid>
<MibcRid Condition="$(MibcRid.Contains('musl-'))">$(MibcRid.Replace('musl-', ''))</MibcRid>
<MibcFile>$(MibcPath)/optimization.$(MibcRid).mibc.runtime/DotNet_FSharp.mibc</MibcFile>
<ReadyToRunOptimizationData>$(MibcFile)</ReadyToRunOptimizationData>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.FSharp.Compiler" ExcludeAssets="contentFiles" GeneratePathProperty="true" />
<PackageReference Include="Microsoft.Build.Framework" />
<PackageReference Include="Microsoft.Build.Tasks.Core" />
<PackageReference Include="Microsoft.Build.Utilities.Core" />
</ItemGroup>
<!-- MIBC don't work for SB yet: https://github.com/dotnet/source-build/issues/247 -->
<Target Name="ValidateMibcFile" AfterTargets="_ResolvePublishNuGetPackagePdbsAndXml" Condition="'$(DotNetBuildSourceOnly)' != 'true' AND '$(SelfContained)' == 'true'">
<Error Condition="!Exists('$(MibcFile)')" Text="MIBC file '$(MibcFile)' does not exist." />
</Target>
<Target Name="_ResolvePublishNuGetPackagePdbsAndXml"
AfterTargets="_ResolveCopyLocalAssetsForPublish">
<PropertyGroup>
<FSharpCorePath Condition="'$(DotNetFinalVersionKind)'!='release'">Shipping</FSharpCorePath>
<FSharpCorePath Condition="'$(DotNetFinalVersionKind)'=='release'">Release</FSharpCorePath>
<FSharpTfm>net9.0</FSharpTfm>
<FSharpTfm Condition="'$(DotNetBuildSourceOnly)' == 'true' and '$(DotNetBuildOrchestrator)' == 'true'">$(NetCurrent)</FSharpTfm>
</PropertyGroup>
<ItemGroup>
<ResolvedFileToPublish
Include="$(PkgMicrosoft_FSharp_Compiler)/lib/$(FSharpTfm)/FSharp.Core.xml"
CopyToPublishDirectory="PreserveNewest"
DestinationSubPath="FSharp.Core.xml"
RelativePath="FSharp.Core.xml"
TargetPath="FSharpCore.xml" />
<FilesToCopyFromFSharpCompilerPackage Include="$(PkgMicrosoft_FSharp_Compiler)/contentFiles/$(FSharpCorePath)/FSharp.Core.*.nupkg" SubDir="library-packs\"/>
<FilesToCopyFromFSharpCompilerPackage Include="$(PkgMicrosoft_FSharp_Compiler)/contentFiles/$(FSharpCorePath)/Microsoft.FSharp.Core.NetSdk.props" SubDir="" />
<FilesToCopyFromFSharpCompilerPackage Include="$(PkgMicrosoft_FSharp_Compiler)/contentFiles/any/any/*" Exclude="$(PkgMicrosoft_FSharp_Compiler)/contentFiles/any/any/Microsoft.FSharp.Core.NetSdk.props" SubDir="" />
<FilesToCopyFromFSharpCompilerPackage Include="$(MibcPath)/*" SubDir="" Condition="'$(DotNetBuildSourceOnly)' != 'true'" />
</ItemGroup>
<ItemGroup>
<ResolvedFileToPublish
Include="@(FilesToCopyFromFSharpCompilerPackage)"
CopyToPublishDirectory="PreserveNewest"
DestinationSubPath="%(FilesToCopyFromFSharpCompilerPackage.SubDir)%(Filename)%(Extension)"
RelativePath="%(FilesToCopyFromFSharpCompilerPackage.SubDir)%(Filename)%(Extension)"
TargetPath="%(FilesToCopyFromFSharpCompilerPackage.SubDir)%(Filename)%(Extension)" />
</ItemGroup>
</Target>
</Project>