aboutsummaryrefslogtreecommitdiff
path: root/test/Driver/riscv-features.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/Driver/riscv-features.c')
-rw-r--r--test/Driver/riscv-features.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/Driver/riscv-features.c b/test/Driver/riscv-features.c
new file mode 100644
index 000000000000..95f84f31c611
--- /dev/null
+++ b/test/Driver/riscv-features.c
@@ -0,0 +1,13 @@
+// RUN: %clang -target riscv32-unknown-elf -### %s -fsyntax-only 2>&1 | FileCheck %s
+// RUN: %clang -target riscv64-unknown-elf -### %s -fsyntax-only 2>&1 | FileCheck %s
+
+// CHECK: fno-signed-char
+
+// RUN: %clang -target riscv32-unknown-elf -### %s -mrelax 2>&1 | FileCheck %s -check-prefix=RELAX
+// RUN: %clang -target riscv32-unknown-elf -### %s -mno-relax 2>&1 | FileCheck %s -check-prefix=NO-RELAX
+// RUN: %clang -target riscv32-unknown-elf -### %s 2>&1 | FileCheck %s -check-prefix=DEFAULT
+
+// RELAX: "-target-feature" "+relax"
+// NO-RELAX: "-target-feature" "-relax"
+// DEFAULT-NOT: "-target-feature" "+relax"
+// DEFAULT-NOT: "-target-feature" "-relax"