Skip to content

Commit

Permalink
Use add_compiler_options to enable spectre mitigations and sdl checks (
Browse files Browse the repository at this point in the history
  • Loading branch information
jander-msft authored May 16, 2024
1 parent d9fda60 commit 517ee4b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 0 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,4 @@ if(CLR_CMAKE_HOST_WIN32)
)
endif(CLR_CMAKE_HOST_WIN32)

if (MSVC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Qspectre")
endif()

add_subdirectory(src/Profilers)
3 changes: 3 additions & 0 deletions eng/native/override/configurecompiler.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,7 @@ if (MSVC)
add_linker_flag(/INCREMENTAL:NO DEBUG) # prevent "warning LNK4075: ignoring '/INCREMENTAL' due to '/OPT:REF' specification"
add_linker_flag(/OPT:REF DEBUG)
add_linker_flag(/OPT:NOICF DEBUG)

add_compile_options(/sdl)
add_compile_options(/Qspectre)
endif(MSVC)

0 comments on commit 517ee4b

Please sign in to comment.