Skip to content

Commit

Permalink
Add CET Shadow Stack Compatible flag (#5637)
Browse files Browse the repository at this point in the history
Add CET Shadow Stack Compatible flag when building DXC to safeguard
against ROP/JOP attacks.

Fixes
[#5578](#5578)
  • Loading branch information
hekota authored Aug 31, 2023
1 parent 96fcc60 commit 50c4c88
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,11 @@ add_compile_options(/guard:cf)
add_link_options(/guard:cf)
endif(WIN32)

# Enable CET Shadow Stack
if(WIN32 AND NOT (CMAKE_GENERATOR_PLATFORM MATCHES "ARM.*"))
add_link_options(/CETCOMPAT)
endif(WIN32 AND NOT (CMAKE_GENERATOR_PLATFORM MATCHES "ARM.*"))

# HLSL Change Ends

# HLSL Change Starts - set flag for Appveyor CI
Expand Down

0 comments on commit 50c4c88

Please sign in to comment.