diff options
author | Scott Constable <scott.d.constable@intel.com> | 2020-04-14 10:32:12 -0700 |
---|---|---|
committer | Tom Stellard <tstellar@redhat.com> | 2020-06-24 09:31:04 -0700 |
commit | 1d8639336d961f6d04142e935be5da16f24e4503 (patch) | |
tree | 24c103aeed601fd824cd83188694b54bbe2bdd8a | |
parent | ac40e7a02efbadd5c91d2fec85aac29ab9a6af18 (diff) | |
download | bcm5719-llvm-1d8639336d961f6d04142e935be5da16f24e4503.tar.gz bcm5719-llvm-1d8639336d961f6d04142e935be5da16f24e4503.zip |
[X86] Add tests to clang Driver to ensure that SLH/Retpoline features are not enabled with LVI-CFI
Differential Revision: https://reviews.llvm.org/D77427
-rw-r--r-- | clang/test/Driver/x86-target-features.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/test/Driver/x86-target-features.c b/clang/test/Driver/x86-target-features.c index 5c1668048f1..4f133b5dd68 100644 --- a/clang/test/Driver/x86-target-features.c +++ b/clang/test/Driver/x86-target-features.c @@ -159,6 +159,13 @@ // LVICFI: "-target-feature" "+lvi-cfi" // NO-LVICFI-NOT: lvi-cfi +// RUN: %clang -target i386-linux-gnu -mlvi-cfi -mspeculative-load-hardening %s -### -o %t.o 2>&1 | FileCheck -check-prefix=LVICFI-SLH %s +// LVICFI-SLH: error: invalid argument 'mspeculative-load-hardening' not allowed with 'mlvi-cfi' +// RUN: %clang -target i386-linux-gnu -mlvi-cfi -mretpoline %s -### -o %t.o 2>&1 | FileCheck -check-prefix=LVICFI-RETPOLINE %s +// LVICFI-RETPOLINE: error: invalid argument 'mretpoline' not allowed with 'mlvi-cfi' +// RUN: %clang -target i386-linux-gnu -mlvi-cfi -mretpoline-external-thunk %s -### -o %t.o 2>&1 | FileCheck -check-prefix=LVICFI-RETPOLINE-EXTERNAL-THUNK %s +// LVICFI-RETPOLINE-EXTERNAL-THUNK: error: invalid argument 'mretpoline-external-thunk' not allowed with 'mlvi-cfi' + // RUN: %clang -target i386-linux-gnu -mwaitpkg %s -### -o %t.o 2>&1 | FileCheck -check-prefix=WAITPKG %s // RUN: %clang -target i386-linux-gnu -mno-waitpkg %s -### -o %t.o 2>&1 | FileCheck -check-prefix=NO-WAITPKG %s // WAITPKG: "-target-feature" "+waitpkg" |