Expand file tree
/
Copy pathDirectory.Build.targets
More file actions
61 lines (55 loc) · 4.55 KB
/
Copy pathDirectory.Build.targets
File metadata and controls
61 lines (55 loc) · 4.55 KB
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
61
<Project>
<Import Project="FSharpBuild.Directory.Build.targets" Condition = " '$(FSharpTestCompilerVersion)' == '' "/>
<Import Project="FSharpTests.Directory.Build.targets" Condition = " '$(FSharpTestCompilerVersion)' != '' "/>
<Import Project="CoordinateXliff.targets" Condition = " '$(FSharpBuildAssemblyFile)' != '' and '$(XliffTasksAssembly)' != '' "/>
<!-- The repo restores from many NuGet sources (Maestro does not support package source mapping),
which triggers NU1507 under Central Package Management. Suppress it here, after the project
bodies (some of which reset NoWarn), so it is applied consistently across every CPM project. -->
<PropertyGroup Condition="'$(ManagePackageVersionsCentrally)' == 'true'">
<NoWarn>$(NoWarn);NU1507</NoWarn>
</PropertyGroup>
<!-- net10.0 ships in the FSharp.Core package only; in-repo .NET consumers keep binding netstandard2.1. -->
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp' and '$(Configuration)' != 'Proto'">
<ProjectReference Update="@(ProjectReference)">
<SetTargetFramework Condition="'%(ProjectReference.Filename)' == 'FSharp.Core' and '%(ProjectReference.SetTargetFramework)' == ''">TargetFramework=netstandard2.1</SetTargetFramework>
</ProjectReference>
</ItemGroup>
<!-- Disable R2R when building source-only and not targeting the current SDK bundled TFM. -->
<PropertyGroup>
<PublishReadyToRun Condition="'$(DotNetBuildSourceOnly)' == 'true' and
'$(TargetFrameworkIdentifier)' == '.NETCoreApp' and
'$(TargetFrameworkVersion)' != ''
and $([MSBuild]::VersionLessThan('$(TargetFrameworkVersion)', '$(BundledNETCoreAppTargetFrameworkVersion)'))">false</PublishReadyToRun>
</PropertyGroup>
<PropertyGroup Condition="'$(BUILDING_USING_DOTNET)' == 'true'">
<!-- Note, that default framework is used here (the one we use for development in the current cycle),
since it's a non-arcade and non-sourcebuild scenario -->
<FsLexPath>$(ArtifactsDir)/bin/fslex/$(Configuration)/$(FSharpNetCoreProductTargetFramework)/$(NETCoreSdkPortableRuntimeIdentifier)/fslex.dll</FsLexPath>
<FsYaccPath>$(ArtifactsDir)/bin/fsyacc/$(Configuration)/$(FSharpNetCoreProductTargetFramework)/$(NETCoreSdkPortableRuntimeIdentifier)/fsyacc.dll</FsYaccPath>
</PropertyGroup>
<!-- We want to restore ALL the MIBCs when we build anything, since in the future it will contain different profiles, not only the FSC one we got from building Giraffe -->
<Import Project="$(MSBuildThisFileDirectory)\eng\restore\optimizationData.targets"/>
<!-- @(MIBCPackage) carries Version item metadata (CopyMIBC needs it to locate the restored .mibc under
the package cache). Under CPM that Version must not sit on a PackageReference (NU1008), and neither
RemoveMetadata nor an identity transform strips it in an evaluation-phase ItemGroup, so list the
identities literally here; the central versions in eng/包.props apply. Opt-out subtrees
(ImportDirectory包Props=false) are not under CPM and keep the inline Version from @(MIBCPackage). -->
<ItemGroup Condition="'$(IgnoreMIBC)' != 'true' and '$(ManagePackageVersionsCentrally)' == 'true'">
<PackageReference Include="optimization.windows_nt-x86.mibc.runtime" />
<PackageReference Include="optimization.windows_nt-x64.mibc.runtime" />
<PackageReference Include="optimization.windows_nt-arm64.mibc.runtime" />
<PackageReference Include="optimization.linux-x64.mibc.runtime" />
<PackageReference Include="optimization.linux-arm64.mibc.runtime" />
</ItemGroup>
<ItemGroup Condition="'$(IgnoreMIBC)' != 'true' and '$(ManagePackageVersionsCentrally)' != 'true'">
<PackageReference Include="@(MIBCPackage)" />
</ItemGroup>
<Target Name="CopyMIBCWrapper" AfterTargets="Restore" BeforeTargets="Build;Pack">
<MSBuild
项目="$(MSBuildThisFileDirectory)eng\restore\optimizationData.targets"
Properties="ArtifactsDir=$(MSBuildThisFileDirectory)artifacts\;NuGetPackageRoot=$(NuGetPackageRoot);MibcFiles=$(MibcFiles);optimizationwindows_ntx86MIBCRuntimeVersion=$(optimizationwindows_ntx86MIBCRuntimeVersion);optimizationwindows_ntx64MIBCRuntimeVersion=$(optimizationwindows_ntx64MIBCRuntimeVersion);optimizationwindows_ntarm64MIBCRuntimeVersion=$(optimizationwindows_ntarm64MIBCRuntimeVersion);optimizationlinuxx64MIBCRuntimeVersion=$(optimizationlinuxx64MIBCRuntimeVersion);optimizationlinuxarm64MIBCRuntimeVersion=$(optimizationlinuxarm64MIBCRuntimeVersion)"
Targets="CopyMIBC"
RemoveProperties="TargetFramework"
StopOnFirstFailure="True" />
</Target>
</Project>