[PATCH] D126137: [X86] Add support for `-mharden-sls=all`

Fangrui Song via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu May 26 13:28:06 PDT 2022


MaskRay added inline comments.


================
Comment at: clang/test/Driver/x86-target-features.c:317
+// SLS-IND: "-target-feature" "+harden-sls-ind"
+// SLS-ALL: "-target-feature" "+harden-sls-ind" "-target-feature" "+harden-sls-ret"
+// SLS-NONE-NOT: harden-sls
----------------
The pattern does not check that `SLS-IND` does not have `"-target-feature" "+harden-sls-ret"`


================
Comment at: clang/test/Driver/x86-target-features.c:308-309
+
+// RUN: %clang -target i386-unknown-linux-gnu -march=i386 -mharden-sls=all %s -### -o %t.o 2>&1 | FileCheck -check-prefix=SLS %s
+// RUN: %clang -target i386-unknown-linux-gnu -march=i386 -mharden-sls=none %s -### -o %t.o 2>&1 | FileCheck -check-prefix=NO-SLS %s
+// SLS: "-target-feature" "+harden-sls-all"
----------------
nickdesaulniers wrote:
> Please add a test for `-mharden-sls=all -mharden-sls=none` to verify that the last value "wins."
` -target ` is deprecated legacy spelling. Better to use `--target=`


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D126137



More information about the cfe-commits mailing list