|
1 |
| -<?xml version="1.0" encoding="utf-8"?> |
| 1 | +<!-- |
| 2 | + SPDX-FileCopyrightText: © 2019 Team CharLS |
| 3 | + SPDX-License-Identifier: BSD-3-Clause |
| 4 | +--> |
| 5 | + |
2 | 6 | <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
3 | 7 | <PropertyGroup>
|
4 | 8 | <!-- Build to a folder outside the source folders, making it easier to clean. -->
|
|
28 | 32 | <!-- Use all cores to speed up the compilation (MS recommended best practice). -->
|
29 | 33 | <MultiProcessorCompilation>true</MultiProcessorCompilation>
|
30 | 34 |
|
31 |
| - <!-- Explicit define that all projects are compiled according the C++20 standard --> |
32 |
| - <LanguageStandard>stdcpp20</LanguageStandard> |
| 35 | + <!-- Explicit define that all projects are compiled according the draft C++23 standard --> |
| 36 | + <LanguageStandard>stdcpplatest</LanguageStandard> |
33 | 37 | <UseStandardPreprocessor>true</UseStandardPreprocessor> <!-- Needed as stdcpp20 doesn't enable it by default. -->
|
34 | 38 |
|
35 | 39 | <!-- To ensure high quality C++ code use Warning level 4 and treat warnings as errors to ensure warnings are fixed promptly. -->
|
36 | 40 | <WarningLevel>Level4</WarningLevel>
|
37 | 41 | <TreatWarningAsError>true</TreatWarningAsError>
|
38 | 42 | <UseFullPaths>true</UseFullPaths>
|
39 | 43 |
|
| 44 | + <!-- Enables recommended Security Development Lifecycle (SDL) checks. |
| 45 | + These checks change security-relevant warnings into errors, and set additional secure code-generation features. --> |
| 46 | + <SDLCheck>true</SDLCheck> |
| 47 | + |
40 | 48 | <!-- Explicit set the 'external' warning level to off (Supported since Visual Studio 2019 16.10) -->
|
41 | 49 | <ExternalWarningLevel>TurnOffAllWarnings</ExternalWarningLevel>
|
42 | 50 | <DisableAnalyzeExternal>true</DisableAnalyzeExternal>
|
|
95 | 103 |
|
96 | 104 | * WINRT *
|
97 | 105 | WINRT_LEAN_AND_MEAN: If defined, disables rarely-used WinRT features (in order to reduce compile times)
|
| 106 | + WINRT_NO_SOURCE_LOCATION (prevents full namespace names in the binary). |
98 | 107 |
|
99 | 108 | * C *
|
100 | 109 | __STDC_WANT_SECURE_LIB__=1: Enable the secure methods of the C standard library.
|
| 110 | +
|
| 111 | + * Microsoft STL * |
| 112 | + _USE_DETAILED_FUNCTION_NAME_IN_SOURCE_LOCATION=0: Keep function name info short to reduce binary size. |
101 | 113 | -->
|
102 | 114 | <PreprocessorDefinitions>
|
103 |
| - WIN32_LEAN_AND_MEAN;NOSERVICE;NOMCX;NOIME;NOMINMAX;WINRT_LEAN_AND_MEAN;__STDC_WANT_SECURE_LIB__=1;%(PreprocessorDefinitions) |
| 115 | + WIN32_LEAN_AND_MEAN;NOSERVICE;NOMCX;NOIME;NOMINMAX;WINRT_LEAN_AND_MEAN;WINRT_NO_SOURCE_LOCATION;__STDC_WANT_SECURE_LIB__=1;_USE_DETAILED_FUNCTION_NAME_IN_SOURCE_LOCATION=0;%(PreprocessorDefinitions) |
104 | 116 | </PreprocessorDefinitions>
|
105 | 117 |
|
106 | 118 | <PrecompiledHeader>NotUsing</PrecompiledHeader>
|
| 119 | + |
| 120 | + <!-- Add metadata about valid EH handler, prevent IP hijacking --> |
| 121 | + <GuardEHContMetadata Condition="'$(Platform)'=='x64'">true</GuardEHContMetadata> |
107 | 122 | </ClCompile>
|
108 | 123 |
|
109 | 124 | <Link>
|
110 | 125 | <SubSystem>Windows</SubSystem>
|
111 | 126 | <GenerateDebugInformation>true</GenerateDebugInformation>
|
112 | 127 | <TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
|
113 | 128 | <MinimumRequiredVersion>10</MinimumRequiredVersion>
|
| 129 | + |
| 130 | + <!-- Indicate DLL is compatible with Hardware supported Shadow stack (requires Zen3+ or Intel 11th Gen CPU) --> |
| 131 | + <CETCompat Condition="'$(Platform)'!='ARM64'">true</CETCompat> |
114 | 132 | </Link>
|
115 | 133 | </ItemDefinitionGroup>
|
116 | 134 |
|
|
0 commit comments