Make sure AES code is present when setting RANDOMX_FLAG_HARD_AES

This commit is contained in:
tevador
2019-10-09 22:06:04 +02:00
parent fc892fc5c0
commit abf2a5034e
2 changed files with 7 additions and 4 deletions

View File

@@ -42,7 +42,7 @@ extern "C" {
randomx_flags randomx_get_flags() {
randomx_flags flags = RANDOMX_HAVE_COMPILER ? RANDOMX_FLAG_JIT : RANDOMX_FLAG_DEFAULT;
randomx::Cpu cpu;
if (cpu.hasAes()) {
if (HAVE_AES && cpu.hasAes()) {
flags |= RANDOMX_FLAG_HARD_AES;
}
if (randomx_argon2_impl_avx2() != nullptr && cpu.hasAvx2()) {