[PATCH] D72479: [PowerPC][AIX] Make PIC the default relocation model for AIX
Steven Wan via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 14 14:17:33 PST 2020
stevewan marked 3 inline comments as done.
stevewan added inline comments.
================
Comment at: llvm/lib/Target/PowerPC/PPCTargetMachine.cpp:226
Optional<Reloc::Model> RM) {
+ // AIX only supports PIC, RM option is ignored.
+ if (TT.isOSAIX())
----------------
hubert.reinterpretcast wrote:
> I meant that the user-facing option processing code should generate an error message to prevent setting something other than PIC for AIX.
>
> The code here should assert `!RM.hasValue() || *RM == Reloc::PIC_` for AIX.
As per personal discussion, the target could be unknown during option processing and therefore RM settings will need to be determined after that phase.
An assertion will be added to this getter function, and the user error will be reported in the llc code before the powerpc target machine is created and this getter function is called, because the PPCTargetMachine constructor doesn't have an existing mechanism to report user errors.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D72479/new/
https://reviews.llvm.org/D72479
More information about the llvm-commits
mailing list