From cd7c7902a9f97727e92991760543c4dd739b5e65 Mon Sep 17 00:00:00 2001 From: XMRig Date: Sun, 29 Aug 2021 18:52:11 +0700 Subject: [PATCH] Fixed clang build. --- cmake/astrobwt.cmake | 5 +++++ src/crypto/astrobwt/xmm6int/salsa20_xmm6int-avx2.c | 7 ------- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/cmake/astrobwt.cmake b/cmake/astrobwt.cmake index 6f48d13e7..f0ebf5306 100644 --- a/cmake/astrobwt.cmake +++ b/cmake/astrobwt.cmake @@ -24,6 +24,11 @@ if (WITH_ASTROBWT) if (CMAKE_SIZEOF_VOID_P EQUAL 8) add_definitions(/DASTROBWT_AVX2) list(APPEND SOURCES_CRYPTO src/crypto/astrobwt/xmm6int/salsa20_xmm6int-avx2.c) + + if (CMAKE_C_COMPILER_ID MATCHES GNU OR CMAKE_C_COMPILER_ID MATCHES Clang) + set_source_files_properties(src/crypto/astrobwt/xmm6int/salsa20_xmm6int-avx2.c PROPERTIES COMPILE_FLAGS -mavx2) + endif() + if (CMAKE_C_COMPILER_ID MATCHES MSVC) enable_language(ASM_MASM) list(APPEND SOURCES_CRYPTO src/crypto/astrobwt/sha3_256_avx2.asm) diff --git a/src/crypto/astrobwt/xmm6int/salsa20_xmm6int-avx2.c b/src/crypto/astrobwt/xmm6int/salsa20_xmm6int-avx2.c index fe2047d41..dab2b74d3 100644 --- a/src/crypto/astrobwt/xmm6int/salsa20_xmm6int-avx2.c +++ b/src/crypto/astrobwt/xmm6int/salsa20_xmm6int-avx2.c @@ -21,13 +21,6 @@ #include #include -#ifdef __GNUC__ -#pragma GCC target("sse2") -#pragma GCC target("ssse3") -#pragma GCC target("sse4.1") -#pragma GCC target("avx2") -#endif - #include #include #include