blob: 2f2ae51e4716dd905edb64c18af1bbb5eb8cefed [file] [log] [blame]
Alex Bradburyfebf5cb2018-01-11 13:36:56 +00001// 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
Shiva Chen2c6477e2018-05-29 00:44:15 +00005
Sam Elliott9c1491f2019-06-21 10:03:31 +00006// RUN: %clang -target riscv32-unknown-elf -### %s 2>&1 | FileCheck %s -check-prefix=DEFAULT
7
Shiva Chen2c6477e2018-05-29 00:44:15 +00008// 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
Shiva Chen2c6477e2018-05-29 00:44:15 +000010
11// RELAX: "-target-feature" "+relax"
12// NO-RELAX: "-target-feature" "-relax"
Shiva Chenc551f902019-02-17 16:05:51 +000013// DEFAULT: "-target-feature" "+relax"
Shiva Chen2c6477e2018-05-29 00:44:15 +000014// DEFAULT-NOT: "-target-feature" "-relax"
Sam Elliott9c1491f2019-06-21 10:03:31 +000015
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: warning: the clang compiler does not support '-msave-restore'
Sam Elliott44f7b2c2019-07-01 14:53:56 +000020// NO-SAVE-RESTORE-NOT: warning: the clang compiler does not support
Roger Ferrer Ibanez47ae2a02019-09-10 08:16:24 +000021// DEFAULT-NOT: warning: the clang compiler does not support
22
23// RUN: %clang -target riscv32-linux -### %s -fsyntax-only 2>&1 \
24// RUN: | FileCheck %s -check-prefix=DEFAULT-LINUX
25// RUN: %clang -target riscv64-linux -### %s -fsyntax-only 2>&1 \
26// RUN: | FileCheck %s -check-prefix=DEFAULT-LINUX
27
28// DEFAULT-LINUX: "-target-feature" "+m"
29// DEFAULT-LINUX-SAME: "-target-feature" "+a"
30// DEFAULT-LINUX-SAME: "-target-feature" "+f"
31// DEFAULT-LINUX-SAME: "-target-feature" "+d"
32// DEFAULT-LINUX-SAME: "-target-feature" "+c"