WindowsAppSDK/WindowsAppSDK.Build.Cpp.props

106 строки
4.6 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT License. See LICENSE in the project root for license information. -->
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- Build with the hybrid CRT (Universal CRT + Static VS CRT (for what little the Universal CRT doesn't cover) -->
<Import Project="$(MSBuildThisFileDirectory)HybridCRT.props" />
<!-- Build with APIscan-friendly compiler+linker options -->
<Import Project="$(MSBuildThisFileDirectory)ApiScan.Cpp.props" />
<!-- Common (all Configurations) options -->
<ItemDefinitionGroup>
<ClCompile>
<!-- /std:c++17 Enable ISO C++17 Standard -->
<LanguageStandard>stdcpp17</LanguageStandard>
<!-- /permissive- Enable Conformance mode (i.e. Disable 'permissive' mode) -->
<ConformanceMode>true</ConformanceMode>
<!-- /W4 Enable max warning level -->
<WarningLevel>Level4</WarningLevel>
<!-- /sdk Enable additional security checks-->
<SDLCheck>true</SDLCheck>
<!-- /GR- Disable RTTI (causes binary bloat) -->
<RuntimeTypeInfo>false</RuntimeTypeInfo>
<!-- /ZH:SHA_256 Hash algorithm for file checksums in debug info -->
<!-- /d1trimfile:$(RepoRoot) If the prefix for a source file path name string matches "trim-string",
then the prefix is removed and is replaced with the mapping-identifier (if present). Requires /Brepro. -->
<!-- /Qspectre Specifies compiler generation of instructions to mitigate certain Spectre variant 1
security vulnerabilities. BinSkim asks for this. -->
<AdditionalOptions>%(AdditionalOptions) /d1trimfile:$(RepoRoot) /ZH:SHA_256 /Qspectre</AdditionalOptions>
</ClCompile>
<Link>
<!-- /DEBUG:FULL Create PDF containing full debug information -->
<GenerateDebugInformation>DebugFull</GenerateDebugInformation>
<!-- /Brepro Enables deterministic output from the compiler toolchain -->
<!-- /PDBALTPATH Stops pdb's basepath from appearing in the Debug Directories of the image header -->
<AdditionalOptions>%(AdditionalOptions) /Brepro /PDBALTPATH:$(TargetName).pdb</AdditionalOptions>
</Link>
</ItemDefinitionGroup>
<!-- Debug-specific options -->
<PropertyGroup Condition="'$(Configuration)'=='Debug'">
<!-- /INCREMENTAL Enable incremental linking -->
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)' == 'Debug'">
<ClCompile>
<!-- /d- Disable optimization -->
<Optimization>Disabled</Optimization>
</ClCompile>
<Link>
</Link>
</ItemDefinitionGroup>
<!-- Release-specific options -->
<PropertyGroup Condition="'$(Configuration)'=='Release'">
<!-- /INCREMENTAL:NO Disable incremental linking -->
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)' == 'Release'">
<ClCompile>
<!-- /GS Enable Control Flow Guard -->
<ControlFlowGuard>Guard</ControlFlowGuard>
<!-- Compile-time optimizations:
/GF Enable read-only string pooling (eliminate duplicate strings)
/GL Whole Program Optimization
/Gy Enable function-level linking
/Gw Optimize Global Data (https://docs.microsoft.com/en-us/cpp/build/reference/gw-optimize-global-data)
-->
<StringPooling>true</StringPooling>
<WholeProgramOptimization>true</WholeProgramOptimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<AdditionalOptions>%(AdditionalOptions) /Gw</AdditionalOptions>
<!-- /Oxs Enable most speed optimizations
NOTE: /Oxs is short-hand for multiple options:
/Ob2 Enable inline function expansion (/Ob2 = Any Suitable)
/Oi Enable intrinsic functions
/Os Favor fast code
/Oy Omit frame pointers
-->
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
<IntrinsicFunctions>true</IntrinsicFunctions>
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
<OmitFramePointers>true</OmitFramePointers>
</ClCompile>
<Link>
<!-- Link-time optimizations:
/LCTG Enable Link Time Code Generation
/OPT:ICF Enable COMDAT folding
/OPT:REF Optimize references
-->
<LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
</Project>