[all-commits] [llvm/llvm-project] 0d3f5e: [compiler-rt][CMake] Pass all flags to _Float16 tr...

Evan Wilde via All-commits all-commits at lists.llvm.org
Fri Apr 4 09:02:45 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 0d3f5ec0da064d2314098644e78d29d3c84e179c
      https://github.com/llvm/llvm-project/commit/0d3f5ec0da064d2314098644e78d29d3c84e179c
  Author: Evan Wilde <ewilde at apple.com>
  Date:   2025-04-04 (Fri, 04 Apr 2025)

  Changed paths:
    M compiler-rt/lib/builtins/CMakeLists.txt

  Log Message:
  -----------
  [compiler-rt][CMake] Pass all flags to _Float16 try-compile (#133952)

The try-compile mechanism requires that `CMAKE_REQUIRED_FLAGS` is a
space-separated string instead of a list of flags. The original code
expanded `BUILTIN_FLAGS` into `CMAKE_REQUIRED_FLAGS` as a
space-separated string and then would overwrite `CMAKE_REQUIRED_FLAGS`
with `TARGET_${arch}_CFLAGS` prepended to the unexpanded
`BUILTIN_CFLAGS_${arch}`. This resulted in the first two arguments being
passed into the try-compile invocation, but dropping the other arguments
listed in `BUILTIN_CFLAGS_${arch}`.

This patch appends `TARGET_${arch}_CFLAGS` and `BUILTIN_CFLAGS_${arch}` to
`CMAKE_REQUIRED_FLAGS` before expanding CMAKE_REQUIRED_FLAGS as a
space-separated string. This passes any pre-set required flags, in addition to
all of the builtin and target flags to the Float16 detection.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list