Commit 85e0ce8
committed
Fix check_assembler_flag to work with cmake 3.20
In the earliest version of cmake supported by LLVM, `try_compile`
doesn't understand convenient `SOURCE_FROM_CONTENT` option, so we must
manually write our (empty) assembly source file and pass it to
`try_compile` by filename.
It also doesn't understand `NO_CACHE`, so in order to avoid making a
spurious cache entry called `success` which would confuse the next
run, I'm putting the result directly into the user-specified output
variable. This leads to a less helpful comment in CMakeCache.txt, but
what can you do.1 parent 2b16ac1 commit 85e0ce8
1 file changed
+8
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
27 | 30 | | |
28 | 31 | | |
29 | | - | |
| 32 | + | |
30 | 33 | | |
31 | | - | |
32 | 34 | | |
33 | 35 | | |
34 | | - | |
35 | 36 | | |
36 | 37 | | |
37 | 38 | | |
| |||
0 commit comments