Commit c6023ce
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 takes the contents of both TARGET_${arch}_CLFAGS and
BUILTIN_FLAGS_${arch}, combines them into a single list, and then
joins that list as a space-separated string in `CMAKE_REQUIRED_FLAGS`.1 parent 75242a8 commit c6023ce
1 file changed
+5
-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 | + | |
861 | 862 | | |
862 | 863 | | |
863 | 864 | | |
| |||
0 commit comments