-
Notifications
You must be signed in to change notification settings - Fork 37.7k
build, refactor: Rely on AC_DEFINE
macro
#24774
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Just to be clear on my understanding: this removes the definitions in these files in the case where they do not pass the test in If so, would it be worthwhile and feasible to remove these archives entirely, in the cases where the functionality is not present? E.g. |
The build system includes the crypto parts only when the related checks passed Lines 40 to 56 in 41720a1
|
Build system review and concept ACK 8251431 Including the config header instead of relying on definitions on the command line is a no-brainer. I would guess this doesn't need parallel changes to the MSVC build system because it doesn't support special instruction sets yet. |
Thinking of it, why do we compile these files at all when the respective option is disabled? |
Some of this might have been done (at some point) to support weird / nonstandard / non-autoconf builds in some way, i.e similar to Lines 23 to 25 in 323d4c0
|
I can see a slight point for a library like |
What does make you think so? For example, when the |
Also we do not use automake/autoconf when building with MSVC. |
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
I bought this up very briefly with Cory, and he said that this was done on purpose. So this change shouldn't be made under the guise of "duplication", and/or move ahead until he weighs in here. If this code does have other use cases then we need to evaluate whether removing it just to support things in the MSVC build is actually more worthwhile. |
What is the purpose? |
@hebasto whoops, sorry for the delayed response. It's rather convenient imo to have the crypto folder work outside of Core. I use it often as a quick way to add a known/trustworthy sha2 impl to another project, like here: https://github.com/theuni/libutreexo I believe @TheBlueMatt has done/does something similar for some of his projects. So for what's in crypto/ at least, unless it's somehow problematic, I'd much prefer to keep the need for bitcoin-config.h to a minimum. |
This change deduplicates the `ENABLE_ARM_SHANI` macro in the build system.
This change deduplicates the `ENABLE_AVX2` macro in the build system.
This change deduplicates the `ENABLE_SSE41` macro in the build system.
This change deduplicates the `ENABLE_X86_SHANI` macro in the build system.
Rebased 8251431 -> 6241d16 (pr24774.02 -> pr24774.03) due to conflict with #24322. |
This change does not make the
I believe all of the cases mentioned above are still working with this PR without any adjustments. In other words, this PR makes |
Are you still working on this? |
On master (9ce1c50) the
ENABLE_ARM_SHANI
,ENABLE_AVX2
,ENABLE_SSE41
, andENABLE_X86_SHANI
macros are defined twice in the build system. First time, using theAC_DEFINE
macro in theconfigure
script. And second time, inMakefile
as a part ofCPPFLAGS
.This PR removes such duplication.
This change is required for #24773.