1 // RUN: %clang -target riscv32-unknown-elf -### %s -fsyntax-only 2>&1 | FileCheck %s
2 // RUN: %clang -target riscv64-unknown-elf -### %s -fsyntax-only 2>&1 | FileCheck %s
3 
4 // CHECK: fno-signed-char
5 
6 // RUN: %clang -target riscv32-unknown-elf -### %s 2>&1 | FileCheck %s -check-prefix=DEFAULT
7 
8 // RUN: %clang -target riscv32-unknown-elf -### %s -mrelax 2>&1 | FileCheck %s -check-prefix=RELAX
9 // RUN: %clang -target riscv32-unknown-elf -### %s -mno-relax 2>&1 | FileCheck %s -check-prefix=NO-RELAX
10 
11 // RELAX: "-target-feature" "+relax"
12 // NO-RELAX: "-target-feature" "-relax"
13 // DEFAULT: "-target-feature" "+relax"
14 // DEFAULT-NOT: "-target-feature" "-relax"
15 
16 // RUN: %clang -target riscv32-unknown-elf -### %s -msave-restore 2>&1 | FileCheck %s -check-prefix=SAVE-RESTORE
17 // RUN: %clang -target riscv32-unknown-elf -### %s -mno-save-restore 2>&1 | FileCheck %s -check-prefix=NO-SAVE-RESTORE
18 
19 // SAVE-RESTORE: "-target-feature" "+save-restore"
20 // NO-SAVE-RESTORE: "-target-feature" "-save-restore"
21 // DEFAULT: "-target-feature" "-save-restore"
22 // DEFAULT-NOT: "-target-feature" "+save-restore"
23 
24 // RUN: %clang -target riscv32-linux -### %s -fsyntax-only 2>&1 \
25 // RUN:   | FileCheck %s -check-prefix=DEFAULT-LINUX
26 // RUN: %clang -target riscv64-linux -### %s -fsyntax-only 2>&1 \
27 // RUN:   | FileCheck %s -check-prefix=DEFAULT-LINUX
28 
29 // DEFAULT-LINUX: "-target-feature" "+m"
30 // DEFAULT-LINUX-SAME: "-target-feature" "+a"
31 // DEFAULT-LINUX-SAME: "-target-feature" "+f"
32 // DEFAULT-LINUX-SAME: "-target-feature" "+d"
33 // DEFAULT-LINUX-SAME: "-target-feature" "+c"
34