Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Place mibc data into RuntimeList.xml with AssetType PgoData #7425

Merged
merged 2 commits into from
May 21, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,13 @@ public override bool Execute()
FileVersion = FileUtilities.GetFileVersion(item.ItemSpec),
IsNative = item.GetMetadata("IsNative") == "true",
IsSymbolFile = item.GetMetadata("IsSymbolFile") == "true",
IsPgoData = item.GetMetadata("IsPgoData") == "true",
IsResourceFile = item.ItemSpec
.EndsWith(".resources.dll", StringComparison.OrdinalIgnoreCase)
})
.Where(f =>
!f.IsSymbolFile &&
(f.Filename.EndsWith(".dll", StringComparison.OrdinalIgnoreCase) || f.IsNative))
(f.Filename.EndsWith(".dll", StringComparison.OrdinalIgnoreCase) || f.IsNative || f.IsPgoData))
// Remove duplicate files this task is given.
.GroupBy(f => f.Item.ItemSpec)
.Select(g => g.First())
Expand All @@ -111,6 +112,10 @@ public override bool Execute()
{
type = "Resources";
}
else if (f.IsPgoData)
{
type = "PgoData";
}

string path = Path.Combine(f.TargetPath, f.Filename).Replace('\\', '/');

Expand All @@ -137,7 +142,12 @@ public override bool Execute()
new XAttribute("Culture", Path.GetFileName(Path.GetDirectoryName(path))));
}

if (f.AssemblyName != null)
if (f.IsPgoData)
{
// Pgo data is never carried with single file images
element.Add(new XAttribute("DropFromSingleFile", "true"));
}
else if (f.AssemblyName != null)
{
byte[] publicKeyToken = f.AssemblyName.GetPublicKeyToken();
string publicKeyTokenHex;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,10 @@
<FilesToPackage Condition="'%(Extension)' == '.pdb' or '%(Extension)' == '.dbg' or '%(Extension)' == '.dwarf'">
<IsSymbolFile>true</IsSymbolFile>
</FilesToPackage>
<FilesToPackage Condition="'%(Extension)' == '.mibc'">
<IsPgoData>true</IsPgoData>
<TargetPath>PgoData</TargetPath>
</FilesToPackage>
<FilesToPackage Condition="$([System.String]::new('%(Filename)').Contains('.ni.{')) and
$([System.String]::new('%(Filename)').EndsWith('}')) and
'%(Extension)' == '.map'">
Expand Down Expand Up @@ -380,6 +384,7 @@
<_FrameworkListRootAttribute Include="FrameworkName" Value="$(SharedFrameworkName)" />
<_FrameworkListRootAttribute Include="Name" Value="$(SharedFrameworkFriendlyName)" />
<_FrameworkListTargetFilePrefix Include="ref/;runtimes/" />
<_FrameworkListTargetFilePrefix Condition="'$(PlatformPackageType)' == 'RuntimePack'" Include="PgoData" />
</ItemGroup>

<CreateFrameworkListFile
Expand Down