Skip to content

Commit c358406

Browse files
author
Aditya Rastogi
committed
Adding compile / link switches for native WindowsML samples
1 parent c878bae commit c358406

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

Samples/WindowsML/cpp/Directory.Build.props

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,23 @@
11
<Project>
2+
<!-- Security settings for Control Flow Guard (CFG) and other mitigations -->
3+
<ItemDefinitionGroup>
4+
<ClCompile>
5+
<AdditionalOptions>%(AdditionalOptions) /Qspectre</AdditionalOptions>
6+
<!-- /GS Enable Control Flow Guard -->
7+
<ControlFlowGuard>Guard</ControlFlowGuard>
8+
<!-- Setting this to be compatible with CFG -->
9+
<DebugInformationFormat>OldStyle</DebugInformationFormat>
10+
<SDLCheck>true</SDLCheck>
11+
</ClCompile>
12+
<Link>
13+
<!-- dynamicbase is required for enabling CFG -->
14+
<AdditionalOptions>%(AdditionalOptions) /dynamicbase</AdditionalOptions>
15+
<!-- /GS Enable Control Flow Guard -->
16+
<ControlFlowGuard>Guard</ControlFlowGuard>
17+
<CETCompat Condition="'$(Platform)'!='ARM64'">true</CETCompat>
18+
</Link>
19+
</ItemDefinitionGroup>
20+
221
<PropertyGroup>
322
<!-- Central NuGet package versions for C++ WindowsML samples -->
423
<WindowsAppSDKVersion>1.8.251106002</WindowsAppSDKVersion>

0 commit comments

Comments
 (0)