Fix preprocessor logic for standalone TF-PSA-Crypto#277
Open
bensze01 wants to merge 1 commit intoMbed-TLS:mainfrom
Open
Fix preprocessor logic for standalone TF-PSA-Crypto#277bensze01 wants to merge 1 commit intoMbed-TLS:mainfrom
bensze01 wants to merge 1 commit intoMbed-TLS:mainfrom
Conversation
| #if (MBEDTLS_VERSION_MAJOR < 4 && defined(MBEDTLS_PSA_CRYPTO_C)) || \ | ||
| (MBEDTLS_VERSION_MAJOR >= 4 && defined(MBEDTLS_PSA_CRYPTO_CLIENT)) | ||
| #if (defined(MBEDTLS_VERSION_MAJOR) && MBEDTLS_VERSION_MAJOR < 4 && defined(MBEDTLS_PSA_CRYPTO_C)) || \ | ||
| ((!defined(MBEDTLS_VERSION_MAJOR) || MBEDTLS_VERSION_MAJOR >= 4) && defined(MBEDTLS_PSA_CRYPTO_CLIENT)) |
Contributor
There was a problem hiding this comment.
I can't think of a good reason to write !defined(MBEDTLS_VERSION_MAJOR). Why would we need to do something special when not building Mbed TLS? If you mean a condition to apply to TF-PSA-Crypto, use defined(TF_PSA_CRYPTO_VERSION_MAJOR).
There are a few places where we are currently using !defined(MBEDTLS_VERSION_MAJOR). They're left behind from a time when we had alreday made TF-PSA-Crypto a separately testable entity but not yet given it version macros. That was just a planning mistake, and we should be removing those !defined(MBEDTLS_VERSION_MAJOR) and using the TF_PSA_CRYPTO_xxx macro now.
4c8aab3 to
c08ee30
Compare
No logical changes intended Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fix preprocessor logic for standalone TF-PSA-Crypto
PR checklist
Please add the numbers (or links) of the associated pull requests for consuming branches. You can omit branches where this pull request is not needed.