[clang] [clang][AArch64] Pass down stack clash protection options to LLVM/Backend (PR #68993)

Momchil Velikov via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 13 07:28:22 PDT 2023


================
@@ -2287,7 +2297,7 @@ void CodeGenModule::SetLLVMFunctionAttributesForDefinition(const Decl *D,
   if ((!D || !D->hasAttr<NoUwtableAttr>()) && CodeGenOpts.UnwindTables)
     B.addUWTableAttr(llvm::UWTableKind(CodeGenOpts.UnwindTables));
 
-  if (CodeGenOpts.StackClashProtector)
+  if (CodeGenOpts.StackClashProtector && !getTarget().getTriple().isAArch64())
----------------
momchil-velikov wrote:

A function-level attribute ought to be set by a source-level attribute, something like `__attribute__((probestack),target("probe-size=31416")))`

https://github.com/llvm/llvm-project/pull/68993


More information about the cfe-commits mailing list