Commit ac4e25c
committed
[compiler-rt][CMake] Pass all flags to try-compile
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} to the list, and then joins
the elements with spaces, resulting in all arguments passed via
CMAKE_REQUIRED_FLAGS being space-separated and being used in the
try-compile when detecting Float16.1 parent 75242a8 commit ac4e25c
1 file changed
+6
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
854 | 854 | | |
855 | 855 | | |
856 | 856 | | |
857 | | - | |
858 | | - | |
859 | | - | |
860 | | - | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
861 | 863 | | |
862 | 864 | | |
863 | 865 | | |
| |||
0 commit comments