Commit 26fdfb5
[ATfE] Fail with an error message when -frwpi is used. (arm#428)
ATfE doesn't currently provide any library variants built for RWPI. And
if you link RWPI with non-RWPI code, nothing good will happen – they
have incompatible ABIs. So we ought to give an error message rather than
silently choose an incompatible library.
Using llvm/llvm-project#149132 which allowed
multilib selection to be aware of the relocation model at all, this
commit does the simplest possible thing: adds a catch-all error message
that will trigger on _any_ use of `-frwpi`, and report that there's no
suitable library variant.
(Another possibility would have been to add `-fno-rwpi` to the validity
criteria for each existing library, but that seemed less likely to give
a good error message. It would allow RWPI variants to be present for
some cases but not all, but at the moment, we don't need that.)
Since the error message works the same everywhere, I've just added one
test.
(cherry picked from commit 43cc67f)1 parent 66c2338 commit 26fdfb5
File tree
2 files changed
+17
-0
lines changed- arm-software/embedded
- arm-multilib
- test/multilib
2 files changed
+17
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
45 | 54 | | |
46 | 55 | | |
47 | 56 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
0 commit comments