[AArch64] Add clang command line support for -mharden-sls=
authorKristof Beyls <kristof.beyls@arm.com>
Mon, 25 May 2020 14:48:22 +0000 (15:48 +0100)
committerKristof Beyls <kristof.beyls@arm.com>
Fri, 19 Jun 2020 06:31:48 +0000 (07:31 +0100)
commitc113b59ef52593818bcd207521fd490ba3deeaea
treec85d6205138f701dcb6eb62deead9d71d65a2524
parent7f0d7f32631648acf48bc23047635ab5e2058a1a
[AArch64] Add clang command line support for -mharden-sls=

The accepted options to -mharden-sls= are:
* all: enable all mitigations against Straight Line Speculation that are
  implemented.
* none: disable all mitigations against Straight Line Speculation.
* retbr: enable the mitigation against Straight Line Speculation for RET
  and BR instructions.
* blr: enable the mitigation against Straight Line Speculation for BLR
  instructions.

Differential Revision: https://reviews.llvm.org/D81404
clang/include/clang/Basic/DiagnosticDriverKinds.td
clang/include/clang/Driver/Options.td
clang/lib/Driver/ToolChains/Arch/AArch64.cpp
clang/test/Driver/aarch64-sls-hardening-options.c [new file with mode: 0644]