From 0e5b2ac12232aa10ffc3749f264c97fa0b19396f Mon Sep 17 00:00:00 2001 From: James Piechota Date: Mon, 2 Dec 2024 20:01:31 +0000 Subject: [PATCH] Expose RANDOMX_UNSAFE as a build flag --- CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 590bee0..4f839b5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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") @@ -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()