[PATCH] D137044: [ClangFE] Add support for option -mno-pic-data-is-text-relative

Ulrich Weigand via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 8 02:37:15 PST 2022


uweigand added a comment.

In D137044#3912908 <https://reviews.llvm.org/D137044#3912908>, @efriedma wrote:

> Move this check into isPC32DBLSymbol, maybe?

Hmm.  This is actually a very interesting point.  `isPC32DBLSymbol` already implements exactly the behavior we want for this option, if `-mcmodel=medium` or `-mcmodel=large` is given.  I hadn't thought about that.

So maybe instead of implementing a new module flag, the `-mno-pic-data-is-text-relative` option can be implemented solely in the front end or driver by mapping it to `-mcmodel=medium`?

(Unfortunately GCC on s390x does not implement `-mcmodel`, otherwise we might not have even needed the new option ...)


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D137044/new/

https://reviews.llvm.org/D137044



More information about the llvm-commits mailing list