-
Notifications
You must be signed in to change notification settings - Fork 10.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[builtins] Only build float16/bfloat16 code if actually supported
When building compiler-rt builtins for x86_64 they library will by default also be built for i386. We unconditionally add the Float16 compile flags since the check for Float16 support will be done using x86_64 compiler flags, but i386 does not actually support it. Fix this by moving the COMPILER_RT_HAS_FLOAT16 and COMPILER_RT_HAS_FLOAT16 checks to a per-target-architecture check inside the loop (using `check_c_source_compiles` and `cmake_{push,pop}_check_state`). Many of the checks in the builtin-config-ix file should probably also be changed to per-target-arch checks, but so far only the Float16 one has caused issues. This is an alternative to D136044 which added a special case for i386 FreeBSD. Fixes: #57224 Differential Revision: https://reviews.llvm.org/D145237 (cherry picked from commit 489bda6)
- Loading branch information
1 parent
c1949c6
commit e0ffaab
Showing
2 changed files
with
18 additions
and
24 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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