<?xml version="1.0" encoding="utf-8"?>
<!-- From our friends at MUX: https://github.com/microsoft/microsoft-ui-xaml/blob/main/PGO.compile.props -->
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
    <PropertyGroup Condition="'$(PGOBuildMode)' == 'Instrument'">
        <WholeProgramOptimization>true</WholeProgramOptimization>
    </PropertyGroup>

    <!-- Enable PGO optimization only for Release builds. -->
    <ItemDefinitionGroup Condition="'$(PGOBuildMode)' == 'Instrument'">
        <Link>
            <AdditionalOptions>/GENPROFILE %(AdditionalOptions)</AdditionalOptions>
            <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
            <AdditionalDependencies Condition="'$(Platform)'=='ARM'">$(VC_ReferencesPath_VC_ARM)\pgort.lib;%(AdditionalDependencies)</AdditionalDependencies>
            <AdditionalDependencies Condition="'$(Platform)'=='ARM64'">$(VC_ReferencesPath_VC_ARM64)\pgort.lib;%(AdditionalDependencies)</AdditionalDependencies>
            <AdditionalDependencies Condition="'$(Platform)'=='Win32'">$(VC_ReferencesPath_VC_x86)\pgort.lib;%(AdditionalDependencies)</AdditionalDependencies>
            <AdditionalDependencies Condition="'$(Platform)'=='x64'">$(VC_ReferencesPath_VC_x64)\pgort.lib;%(AdditionalDependencies)</AdditionalDependencies>
        </Link>
    </ItemDefinitionGroup>
</Project>