Skip to content

Enable Control Flow Guard (CFG) for Release builds#231

Merged
bobsira merged 1 commit into
microsoft:mainfrom
prince-melvin:user/princemelvin/fix_cfg
Jun 18, 2026
Merged

Enable Control Flow Guard (CFG) for Release builds#231
bobsira merged 1 commit into
microsoft:mainfrom
prince-melvin:user/princemelvin/fix_cfg

Conversation

@prince-melvin

Copy link
Copy Markdown
Contributor

Add Guard to both ClCompile and Link sections in the vcxproj for Release|Win32 and Release|x64 configurations. Also add /guard:cf compiler and linker flags in CMakeLists.txt for MSVC builds.

Fixes #230

Add <ControlFlowGuard>Guard</ControlFlowGuard> to both ClCompile and Link
sections in the vcxproj for Release|Win32 and Release|x64 configurations.
Also add /guard:cf compiler and linker flags in CMakeLists.txt for MSVC builds.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@prince-melvin

Copy link
Copy Markdown
Contributor Author

@iankingori, Can I get a review on this?

@bobsira bobsira left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@bobsira bobsira merged commit d07608d into microsoft:main Jun 18, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enable Control Flow Guard (CFG) to fix BinSkim BA2008

3 participants