Skip to content
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

Use CMAKE_C_SIMULATE_ID when available to determine compiler #8389

Merged
merged 1 commit into from
Jun 24, 2024
Merged

Use CMAKE_C_SIMULATE_ID when available to determine compiler #8389

merged 1 commit into from
Jun 24, 2024

Conversation

daantimmer
Copy link
Contributor

@daantimmer daantimmer commented Oct 18, 2023

Description

Enable mbed-tls to be build using cmake using clang-cl. Clang-cl is used when cross compiling from Linux to target Windows using xwin.

Additionaly removed a superfluous check on the clang-compiler ID.

Fixes #8387

PR checklist

Notes for the submitter

Please refer to the contributing guidelines, especially the
checklist for PR contributors.

@tom-daubney-arm tom-daubney-arm added enhancement component-platform Portability layer and build scripts needs-ci Needs to pass CI tests size-s Estimated task size: small (~2d) priority-medium Medium priority - this can be reviewed as time permits needs-review Every commit must be reviewed by at least two team members, needs-reviewer This PR needs someone to pick it up for review and removed needs-ci Needs to pass CI tests labels Oct 19, 2023
Copy link
Contributor

@yanesca yanesca left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@daantimmer
Copy link
Contributor Author

@yanesca what else needs to happen to get this merged?

@yanesca
Copy link
Contributor

yanesca commented May 7, 2024

@daantimmer it needs approval from a second reviewer.

@tom-daubney-arm tom-daubney-arm self-requested a review May 7, 2024 07:35
@tom-daubney-arm tom-daubney-arm removed the needs-reviewer This PR needs someone to pick it up for review label May 7, 2024
@daantimmer
Copy link
Contributor Author

Is that a case of "hope some other reviewer sees this". Or do we have to assign/poke someone specific?

@tom-cosgrove-arm
Copy link
Contributor

Do we want to backport this to 3.6? Letting CMakeLists.txt diverge this early on in the LTS lifetime is likely to lead to problems later on.

@yanesca
Copy link
Contributor

yanesca commented May 7, 2024

Is that a case of "hope some other reviewer sees this". Or do we have to assign/poke someone specific?

Not anymore, @tom-daubney-arm will be reviewing it.

Do we want to backport this to 3.6? Letting CMakeLists.txt diverge this early on in the LTS lifetime is likely to lead to problems later on.

Yes, we do (when I originally reviewed this, we didn't have 3.6).

@yanesca yanesca added the needs-backports Backports are missing or are pending review and approval. label May 7, 2024
@tom-cosgrove-arm
Copy link
Contributor

I've updated the description with the backport requirements

Copy link
Contributor

@tom-daubney-arm tom-daubney-arm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - awaiting 3.6 BP

@tom-daubney-arm tom-daubney-arm added approved Design and code approved - may be waiting for CI or backports and removed needs-review Every commit must be reviewed by at least two team members, labels May 8, 2024
@tom-cosgrove-arm
Copy link
Contributor

tom-cosgrove-arm commented May 8, 2024

I am a little concerned that the documentation of CMAKE_<LANG>_SIMULATE_ID doesn't match the description of CMAKE_C_SIMULATE_ID above.

The documentation says

Some compilers simulate other compilers to serve as drop-in replacements. When CMake detects such a compiler it sets this variable to what would have been the CMAKE__COMPILER_ID for the simulated compiler.

In other words, this variable describes the ABI compatibility of the generated code

Whereas my understanding of the above (and the behaviour of clang-cl on Windows under VS) is that it would be the command-line interface of the compiler.

@paul-elliott-arm Do you have any knowledge here?

@paul-elliott-arm
Copy link
Member

I have not seen this used before, but this seems fine to me, albeit as you say, a little confusing in the way they word things.

Copy link
Contributor

@tom-cosgrove-arm tom-cosgrove-arm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Making it clear I am happy with this, and we just need 3.6 backport

@eleuzi01 eleuzi01 removed the needs-backports Backports are missing or are pending review and approval. label Jun 24, 2024
@tom-cosgrove-arm tom-cosgrove-arm added this pull request to the merge queue Jun 24, 2024
Merged via the queue into Mbed-TLS:development with commit dd48f0f Jun 24, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Design and code approved - may be waiting for CI or backports component-platform Portability layer and build scripts enhancement priority-medium Medium priority - this can be reviewed as time permits size-s Estimated task size: small (~2d)
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Add support for compiling using clang-cl to target windows
6 participants