Prevent restore from deleting mibc cache file (#91220)
Restore should not remove the mibc cache file that is
used to enable incrementalism when merging mibc files.
This fixes an issue with the logic introduced in
454057de49
, which
was tested on incremental builds without restore.
This commit is contained in:
Родитель
d5026a18ea
Коммит
4391213ac1
|
@ -1,4 +1,4 @@
|
|||
<Project>
|
||||
<Project>
|
||||
<ItemGroup>
|
||||
<!-- Mibc data to use when exact architecture match is available -->
|
||||
<MIBCPackageDef Include="optimization.windows_nt-x86.mibc.runtime" Version="$(optimizationwindows_ntx86MIBCRuntimeVersion)" MibcArchitecture="windows/x86"/>
|
||||
|
@ -25,6 +25,9 @@
|
|||
<Target Name="GetMIBCData"
|
||||
AfterTargets="Restore">
|
||||
|
||||
<PropertyGroup>
|
||||
<_MergeMibcFilesCacheFile>$(MibcOptimizationDataDir)/$(TargetOS)/$(TargetArchitecture)/merge_mibc_files.cache</_MergeMibcFilesCacheFile>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<MIBCPackage>
|
||||
<PackagePath>$(NuGetPackageRoot)%(MIBCPackage.Identity)/%(MIBCPackage.Version)</PackagePath>
|
||||
|
@ -32,7 +35,7 @@
|
|||
<_optimizationMibcFile Include="%(MIBCPackage.PackagePath)/**/*.mibc" SubdirectoryName="$(TargetOS)/$(TargetArchitecture)" />
|
||||
<_optimizationMibcDestinationFile Include="@(_optimizationMibcFile->'$(MibcOptimizationDataDir)%(SubdirectoryName)/%(RecursiveDir)%(Filename)%(Extension)')" />
|
||||
<ExcessFilesCurrentlyPresent Include="$(MibcOptimizationDataDir)/**"
|
||||
Exclude="@(_optimizationMibcDestinationFile)"/>
|
||||
Exclude="@(_optimizationMibcDestinationFile);$(_MergeMibcFilesCacheFile)"/>
|
||||
</ItemGroup>
|
||||
|
||||
<Error Condition="'@(_optimizationMibcFile)' == ''" Text="Failed to restore Mibc optimization data" />
|
||||
|
|
Загрузка…
Ссылка в новой задаче