[all-commits] [llvm/llvm-project] e0ffaa: [builtins] Only build float16/bfloat16 code if act...
Alexander Richardson via All-commits
all-commits at lists.llvm.org
Thu Mar 9 06:36:24 PST 2023
Branch: refs/heads/release/16.x
Home: https://github.com/llvm/llvm-project
Commit: e0ffaabd2f75af7f96fea0878e587314777bae39
https://github.com/llvm/llvm-project/commit/e0ffaabd2f75af7f96fea0878e587314777bae39
Author: Alex Richardson <alexrichardson at google.com>
Date: 2023-03-09 (Thu, 09 Mar 2023)
Changed paths:
M compiler-rt/cmake/builtin-config-ix.cmake
M compiler-rt/lib/builtins/CMakeLists.txt
Log Message:
-----------
[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: https://github.com/llvm/llvm-project/issues/57224
Differential Revision: https://reviews.llvm.org/D145237
(cherry picked from commit 489bda6a9c0ec9d2644b7bb0c230294d38f7296e)
More information about the All-commits
mailing list