114 строки
5.3 KiB
XML
114 строки
5.3 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++20 Enable ISO C++20 Standard -->
|
|
<LanguageStandard>stdcpp20</LanguageStandard>
|
|
|
|
<!-- /permissive- Enable Conformance mode (i.e. Disable 'permissive' mode) -->
|
|
<ConformanceMode>true</ConformanceMode>
|
|
|
|
<!-- /GR- Disable RTTI (causes binary bloat) -->
|
|
<RuntimeTypeInfo>false</RuntimeTypeInfo>
|
|
|
|
<!-- /sdk Enable additional security checks-->
|
|
<SDLCheck>true</SDLCheck>
|
|
|
|
<!-- /W4 Enable max warning level -->
|
|
<WarningLevel>Level4</WarningLevel>
|
|
|
|
<!-- /Qspectre Specifies compiler generation of instructions to mitigate certain Spectre variant 1 security vulnerabilities. BinSkim asks for this. -->
|
|
<!-- /ZH:SHA_256 Hash algorithm for file checksums in debug info -->
|
|
<!-- /await:strict Enable coroutine support. Disable language extensions present in /await that weren't adopted into C++20 -->
|
|
<!-- /d1trimfile:$(RepoRoot) If the prefix for a source file path name string matches "trim-string" the prefix is replaced with the mapping-identifier (if present). Requires /Brepro. -->
|
|
<!-- /we4715 If warning 4715 as an error (C4715 = 'function': not all control paths return a value) -->
|
|
<AdditionalOptions>%(AdditionalOptions) /Qspectre /ZH:SHA_256 /await:strict /d1trimfile:$(RepoRoot) /we4715</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 -->
|
|
<!-- /CETCOMPAT enables Control-flow Enforcement Technology (CET) Shadow Stack mitigation.
|
|
BinSkim asks for this. /CETCOMPAT does not support arm64 -->
|
|
<AdditionalOptions Condition="'$(Platform)' == 'arm64'">%(AdditionalOptions) /Brepro /PDBALTPATH:$(TargetName).pdb</AdditionalOptions>
|
|
<AdditionalOptions Condition="'$(Platform)' != 'arm64'">%(AdditionalOptions) /Brepro /PDBALTPATH:$(TargetName).pdb /CETCOMPAT</AdditionalOptions>
|
|
</Link>
|
|
</ItemDefinitionGroup>
|
|
|
|
<!-- BinSkim emits errors or warnings without this settings -->
|
|
<PropertyGroup>
|
|
<SpectreMitigation>Spectre</SpectreMitigation>
|
|
</PropertyGroup>
|
|
|
|
<!-- 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>
|