Skip to content

[compiler-rt] Fix detecting _Float16 support for secondary targets #117813

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

arichardson
Copy link
Member

It turns out we were not passing -m32 to the check_c_source_compiles()
invocation since CMAKE_REQUIRE_FLAGS needs to be string separated list and
we were passing a ;-separated CMake list which appears to be parsed by
CMake as 'ignore all arguments beyond the first'.
Fix this by transforming the list to a command line first.

With this change, Clang 17 no longer claims to support _Float16 for i386.

Created using spr 1.3.6-beta.1
Copy link
Member

@compnerd compnerd left a comment

Choose a reason for hiding this comment

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

Ah CMake, never change. Thanks for fixing this!

Copy link
Collaborator

@DimitryAndric DimitryAndric left a comment

Choose a reason for hiding this comment

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

Yes, this seems reasonable :)

@DimitryAndric
Copy link
Collaborator

@arichardson are you a committer? If not, ping me and I will merge this.

@DimitryAndric DimitryAndric merged commit a4c8ef0 into main Nov 28, 2024
10 checks passed
@DimitryAndric DimitryAndric deleted the users/arichardson/spr/compiler-rt-fix-detecting-_float16-support-for-secondary-targets branch November 28, 2024 18:42
etcwilde pushed a commit to etcwilde/llvm-project that referenced this pull request Apr 4, 2025
…lvm#117813)

It turns out we were not passing -m32 to the check_c_source_compiles()
invocation since CMAKE_REQUIRE_FLAGS needs to be string separated list
and
we were passing a ;-separated CMake list which appears to be parsed by
CMake as 'ignore all arguments beyond the first'.
Fix this by transforming the list to a command line first.

With this change, Clang 17 no longer claims to support _Float16 for
i386.

(cherry picked from commit a4c8ef0)
etcwilde added a commit to swiftlang/llvm-project that referenced this pull request Apr 7, 2025
[compiler-rt] Fix detecting _Float16 support for secondary targets (llvm#117813)
devincoughlin pushed a commit to swiftlang/llvm-project that referenced this pull request Apr 21, 2025
…lvm#117813)

It turns out we were not passing -m32 to the check_c_source_compiles()
invocation since CMAKE_REQUIRE_FLAGS needs to be string separated list
and
we were passing a ;-separated CMake list which appears to be parsed by
CMake as 'ignore all arguments beyond the first'.
Fix this by transforming the list to a command line first.

With this change, Clang 17 no longer claims to support _Float16 for
i386.

(cherry picked from commit a4c8ef0)
(cherry picked from commit 8b57579)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants