Skip to content

Commit

Permalink
Update the vcxproj to fix binskim (#9)
Browse files Browse the repository at this point in the history
Binskim errors:

D:\a\_work\1\b\Release\x64\OpenAI.dll: error BA2008: 'OpenAI.dll' does
not enable the control flow guard (CFG) mitigation. To resolve this
issue, pass /guard:cf on both the compiler and linker command lines.
Binaries also require the /DYNAMICBASE linker option in order to enable
CFG.
  • Loading branch information
darthwing-duck committed Apr 19, 2023
1 parent 4ae0da1 commit dd30471
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion OpenAI.WinRT.nuspec
Expand Up @@ -2,7 +2,7 @@
<package >
<metadata>
<id>OpenAI.WinRT</id>
<version>0.0.14</version>
<version>0.0.15</version>
<title>OpenAI.WinRT</title>
<authors>Alexander Sklar</authors>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
Expand Down
9 changes: 8 additions & 1 deletion OpenAI.WinRT.vcxproj
Expand Up @@ -139,10 +139,17 @@
<LanguageStandard Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">stdcpp20</LanguageStandard>
<LanguageStandard Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">stdcpp20</LanguageStandard>
<LanguageStandard Condition="'$(Configuration)|$(Platform)'=='Release|x64'">stdcpp20</LanguageStandard>
<ControlFlowGuard Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">Guard</ControlFlowGuard>
<ControlFlowGuard Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">Guard</ControlFlowGuard>
<ControlFlowGuard Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Guard</ControlFlowGuard>
<ControlFlowGuard Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Guard</ControlFlowGuard>
</ClCompile>
<Link>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<CETCompat Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">true</CETCompat>
<CETCompat Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</CETCompat>
<CETCompat Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</CETCompat>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
Expand Down Expand Up @@ -216,4 +223,4 @@
<Error Condition="!Exists('packages\Microsoft.Windows.CppWinRT.2.0.220531.1\build\native\Microsoft.Windows.CppWinRT.props')" Text="$([System.String]::Format('$(ErrorText)', 'packages\Microsoft.Windows.CppWinRT.2.0.220531.1\build\native\Microsoft.Windows.CppWinRT.props'))" />
<Error Condition="!Exists('packages\Microsoft.Windows.CppWinRT.2.0.220531.1\build\native\Microsoft.Windows.CppWinRT.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\Microsoft.Windows.CppWinRT.2.0.220531.1\build\native\Microsoft.Windows.CppWinRT.targets'))" />
</Target>
</Project>
</Project>

0 comments on commit dd30471

Please sign in to comment.