[PATCH] D85649: [AArch64] PAC/BTI code generation for LLVM generated functions

Teresa Johnson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 16 14:45:49 PDT 2020


tejohnson added a comment.

In D85649#2277927 <https://reviews.llvm.org/D85649#2277927>, @nickdesaulniers wrote:

> The only question I have about module level attributes is what happens for LTO (which we use for Linux kernels used in Android)?  Is there any conflict linking together objects from two different translation units with two different flags?  Maybe this should fail hard; but it would be cool to alert developers at compile time, rather than have an awful bug to debug at runtime.  Just food for thought; I don't know enough about LTO to know if it already has machinery to handle module level conflicts or not.  Maybe @tejohnson or @pcc knows?

I haven't looked at this patch or what it does in any detail, but any module level flag needs to specify its behavior when merging modules (for *LTO). The addModuleFlag calls added in this patch specify Override, which means:

  /// Uses the specified value, regardless of the behavior or value of the
  /// other module. If both modules specify **Override**, but the values
  /// differ, an error will be emitted.
  Override = 4,

So if it is specified in one module but not the other, the specified module flag will apply to the merged module. If it is specified in both modules (assuming both have the Override type, which it seems like the would), it will be an error if the values differ.


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

https://reviews.llvm.org/D85649



More information about the llvm-commits mailing list