mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-08-03 01:02:49 +02:00
Merge bitcoin/bitcoin#32551: cmake: Remove ENABLE_{SSE41,AVX2,X86_SHANI,ARM_SHANI}
from bitcoin-build-config.h
800b7cc42c
cmake: Add missed `SSE41_CXXFLAGS` (Hennadii Stepanov)028476e71f
cmake: Remove `ENABLE_ARM_SHANI` from `bitcoin-build-config.h` (Hennadii Stepanov)1e900528d2
cmake: Remove `ENABLE_X86_SHANI` from `bitcoin-build-config.h` (Hennadii Stepanov)8689628e2e
cmake: Remove `ENABLE_AVX2` from `bitcoin-build-config.h` (Hennadii Stepanov)a8e2342dca
cmake: Remove `ENABLE_SSE41` from `bitcoin-build-config.h` (Hennadii Stepanov) Pull request description: `ENABLE_{SSE41,AVX2,X86_SHANI,ARM_SHANI}` are already conditionally defined for the [`bitcoin_crypto`](https://github.com/bitcoin/bitcoin/blob/master/src/crypto/CMakeLists.txt) target, and they are not used by any other targets. Defining them globally in `bitcoin-build-config.h` is therefore redundant. Additionally, the previously missing `SSE41_CXXFLAGS` variable has been [added](https://github.com/bitcoin/bitcoin/pull/32550#issuecomment-2890918551). ACKs for top commit: fanquake: ACK800b7cc42c
Tree-SHA512: da792a0b780c67b432b09c9288ca98d62545315c721fed13510d1c11f8bb0cddd9a4ed7a009b4d052471dda19d0641bbc1eae4805fc306d23bf9b4ef510089c8
This commit is contained in:
@@ -29,18 +29,9 @@
|
||||
/* Copyright year */
|
||||
#define COPYRIGHT_YEAR @COPYRIGHT_YEAR@
|
||||
|
||||
/* Define this symbol to build code that uses ARMv8 SHA-NI intrinsics */
|
||||
#cmakedefine ENABLE_ARM_SHANI 1
|
||||
|
||||
/* Define this symbol to build code that uses AVX2 intrinsics */
|
||||
#cmakedefine ENABLE_AVX2 1
|
||||
|
||||
/* Define if external signer support is enabled */
|
||||
#cmakedefine ENABLE_EXTERNAL_SIGNER 1
|
||||
|
||||
/* Define this symbol to build code that uses SSE4.1 intrinsics */
|
||||
#cmakedefine ENABLE_SSE41 1
|
||||
|
||||
/* Define to 1 to enable tracepoints for Userspace, Statically Defined Tracing
|
||||
*/
|
||||
#cmakedefine ENABLE_TRACING 1
|
||||
@@ -48,9 +39,6 @@
|
||||
/* Define to 1 to enable wallet functions. */
|
||||
#cmakedefine ENABLE_WALLET 1
|
||||
|
||||
/* Define this symbol to build code that uses x86 SHA-NI intrinsics */
|
||||
#cmakedefine ENABLE_X86_SHANI 1
|
||||
|
||||
/* Define to 1 if you have the declaration of `fork', and to 0 if you don't.
|
||||
*/
|
||||
#cmakedefine01 HAVE_DECL_FORK
|
||||
|
@@ -170,7 +170,6 @@ if(NOT MSVC)
|
||||
" HAVE_SSE41
|
||||
CXXFLAGS ${SSE41_CXXFLAGS}
|
||||
)
|
||||
set(ENABLE_SSE41 ${HAVE_SSE41})
|
||||
|
||||
# Check for AVX2 intrinsics.
|
||||
set(AVX2_CXXFLAGS -mavx -mavx2)
|
||||
@@ -185,7 +184,6 @@ if(NOT MSVC)
|
||||
" HAVE_AVX2
|
||||
CXXFLAGS ${AVX2_CXXFLAGS}
|
||||
)
|
||||
set(ENABLE_AVX2 ${HAVE_AVX2})
|
||||
|
||||
# Check for x86 SHA-NI intrinsics.
|
||||
set(X86_SHANI_CXXFLAGS -msse4 -msha)
|
||||
@@ -202,7 +200,6 @@ if(NOT MSVC)
|
||||
" HAVE_X86_SHANI
|
||||
CXXFLAGS ${X86_SHANI_CXXFLAGS}
|
||||
)
|
||||
set(ENABLE_X86_SHANI ${HAVE_X86_SHANI})
|
||||
|
||||
# Check for ARMv8 SHA-NI intrinsics.
|
||||
set(ARM_SHANI_CXXFLAGS -march=armv8-a+crypto)
|
||||
@@ -220,5 +217,4 @@ if(NOT MSVC)
|
||||
" HAVE_ARM_SHANI
|
||||
CXXFLAGS ${ARM_SHANI_CXXFLAGS}
|
||||
)
|
||||
set(ENABLE_ARM_SHANI ${HAVE_ARM_SHANI})
|
||||
endif()
|
||||
|
@@ -47,7 +47,7 @@ if(HAVE_SSE41 AND HAVE_X86_SHANI)
|
||||
target_compile_definitions(bitcoin_crypto PRIVATE ENABLE_SSE41 ENABLE_X86_SHANI)
|
||||
target_sources(bitcoin_crypto PRIVATE sha256_x86_shani.cpp)
|
||||
set_property(SOURCE sha256_x86_shani.cpp PROPERTY
|
||||
COMPILE_OPTIONS ${X86_SHANI_CXXFLAGS}
|
||||
COMPILE_OPTIONS ${SSE41_CXXFLAGS} ${X86_SHANI_CXXFLAGS}
|
||||
)
|
||||
endif()
|
||||
|
||||
|
@@ -2,8 +2,6 @@
|
||||
// Distributed under the MIT software license, see the accompanying
|
||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
#include <bitcoin-build-config.h> // IWYU pragma: keep
|
||||
|
||||
#include <crypto/sha256.h>
|
||||
#include <crypto/common.h>
|
||||
|
||||
|
@@ -614,15 +614,7 @@ fn lint_includes_build_config() -> LintResult {
|
||||
"*.cpp",
|
||||
"*.h",
|
||||
])
|
||||
.args(get_pathspecs_default_excludes())
|
||||
.args([
|
||||
// These are exceptions which don't use bitcoin-build-config.h, rather CMakeLists.txt adds
|
||||
// these cppflags manually.
|
||||
":(exclude)src/crypto/sha256_arm_shani.cpp",
|
||||
":(exclude)src/crypto/sha256_avx2.cpp",
|
||||
":(exclude)src/crypto/sha256_sse41.cpp",
|
||||
":(exclude)src/crypto/sha256_x86_shani.cpp",
|
||||
]),
|
||||
.args(get_pathspecs_default_excludes()),
|
||||
)
|
||||
.expect("grep failed");
|
||||
git()
|
||||
|
Reference in New Issue
Block a user