Skip to content

Commit

Permalink
Expose RANDOMX_UNSAFE as a build flag
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesPiechota committed Dec 2, 2024
1 parent 24eebd9 commit 0e5b2ac
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 @@ -253,6 +253,7 @@ set(RANDOMX_FREQ_CBRANCH "" CACHE STRING "Set the RANDOMX_FREQ_CBRANCH value")
set(RANDOMX_FREQ_CFROUND "" CACHE STRING "Set the RANDOMX_FREQ_CFROUND value")
set(RANDOMX_FREQ_ISTORE "" CACHE STRING "Set the RANDOMX_FREQ_ISTORE value")
set(RANDOMX_FREQ_NOP "" CACHE STRING "Set the RANDOMX_FREQ_NOP value")
set(RANDOMX_UNSAFE "" CACHE STRING "Set the RANDOMX_UNSAFE value")

if(USE_HIDDEN_VISIBILITY)
add_compile_options("-fvisibility=hidden")
Expand Down Expand Up @@ -413,6 +414,10 @@ if(RANDOMX_FREQ_NOP)
target_compile_definitions(randomx PRIVATE RANDOMX_FREQ_NOP=${RANDOMX_FREQ_NOP})
endif()

if(RANDOMX_UNSAFE)
target_compile_definitions(randomx PRIVATE RANDOMX_UNSAFE=${RANDOMX_UNSAFE})
endif()

if(TARGET generate-asm)
add_dependencies(randomx generate-asm)
endif()
Expand Down

0 comments on commit 0e5b2ac

Please sign in to comment.