Skip to content

Conversation

@MarkMurrayARM
Copy link
Contributor

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)

@MarkMurrayARM MarkMurrayARM requested a review from a team as a code owner July 28, 2025 11:21
@statham-arm
Copy link
Contributor

As far as I can see, llvm/llvm-project#149132 isn't on this release branch, so clang won't be including -frwpi in the multiilb flag set for this check to detect. So I'd expect the error message never to trigger at all. I presume the ongoing CI run will fail the test added by this commit.

@MarkMurrayARM MarkMurrayARM force-pushed the release/arm-software/21.x branch 2 times, most recently from fd2f805 to 2ed83df Compare July 28, 2025 15:14
@MarkMurrayARM MarkMurrayARM requested a review from a team as a code owner July 28, 2025 15:14
@MarkMurrayARM MarkMurrayARM force-pushed the release/arm-software/21.x branch from 2ed83df to 8b4370a Compare July 28, 2025 15:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants