[clang] da62a5c - [Driver][test] Clean up riscv* tests

Fangrui Song via cfe-commits cfe-commits at lists.llvm.org
Fri Mar 25 23:59:34 PDT 2022


Author: Fangrui Song
Date: 2022-03-25T23:59:31-07:00
New Revision: da62a5c6610dd2087ce2f527ca84ba43e93d5e30

URL: https://github.com/llvm/llvm-project/commit/da62a5c6610dd2087ce2f527ca84ba43e93d5e30
DIFF: https://github.com/llvm/llvm-project/commit/da62a5c6610dd2087ce2f527ca84ba43e93d5e30.diff

LOG: [Driver][test] Clean up riscv* tests

See `D119309` for the guideline (-target, -no-canonical-prefixes, unneeded -o
with -###).

Added: 
    

Modified: 
    clang/test/Driver/riscv-abi.c
    clang/test/Driver/riscv-arch.c
    clang/test/Driver/riscv-args.c
    clang/test/Driver/riscv-cpus.c
    clang/test/Driver/riscv-default-features.c
    clang/test/Driver/riscv-features.c
    clang/test/Driver/riscv-fixed-x-register.c
    clang/test/Driver/riscv-gnutools.c
    clang/test/Driver/riscv-sdata-warning.c
    clang/test/Driver/riscv32-toolchain-extra.c
    clang/test/Driver/riscv32-toolchain.c
    clang/test/Driver/riscv64-toolchain-extra.c
    clang/test/Driver/riscv64-toolchain.c

Removed: 
    


################################################################################
diff  --git a/clang/test/Driver/riscv-abi.c b/clang/test/Driver/riscv-abi.c
index 07f2f1acf2128..be5e88f672099 100644
--- a/clang/test/Driver/riscv-abi.c
+++ b/clang/test/Driver/riscv-abi.c
@@ -1,84 +1,84 @@
-// RUN: %clang -target riscv32-unknown-elf %s -### -o %t.o 2>&1 \
+// RUN: %clang --target=riscv32-unknown-elf %s -### 2>&1 \
 // RUN:   | FileCheck -check-prefix=CHECK-ILP32 %s
-// RUN: %clang -target riscv32-unknown-elf %s -### -o %t.o -mabi=ilp32 2>&1 \
+// RUN: %clang --target=riscv32-unknown-elf %s -### -mabi=ilp32 2>&1 \
 // RUN:   | FileCheck -check-prefix=CHECK-ILP32 %s
-// RUN: %clang -target riscv32-unknown-elf %s -### -o %t.o -march=rv32imc 2>&1 \
+// RUN: %clang --target=riscv32-unknown-elf %s -### -march=rv32imc 2>&1 \
 // RUN:   | FileCheck -check-prefix=CHECK-ILP32 %s
-// RUN: %clang -target riscv32-unknown-elf %s -### -o %t.o -march=rv32imf 2>&1 \
+// RUN: %clang --target=riscv32-unknown-elf %s -### -march=rv32imf 2>&1 \
 // RUN:   | FileCheck -check-prefix=CHECK-ILP32 %s
-// RUN: %clang -target riscv32-unknown-elf -x assembler %s -### -o %t.o 2>&1 \
+// RUN: %clang --target=riscv32-unknown-elf -x assembler %s -### 2>&1 \
 // RUN:   | FileCheck -check-prefix=CHECK-ILP32 %s
-// RUN: %clang -target riscv32-unknown-elf -x assembler %s -### -o %t.o \
+// RUN: %clang --target=riscv32-unknown-elf -x assembler %s -### \
 // RUN:   -mabi=ilp32 2>&1 | FileCheck -check-prefix=CHECK-ILP32 %s
 
 // CHECK-ILP32: "-target-abi" "ilp32"
 
-// RUN: %clang -target riscv32-unknown-elf %s -### -o %t.o -march=rv32e -mabi=ilp32e 2>&1 \
+// RUN: %clang --target=riscv32-unknown-elf %s -### -march=rv32e -mabi=ilp32e 2>&1 \
 // RUN:   | FileCheck -check-prefix=CHECK-ILP32E %s
-// RUN: %clang -target riscv32-unknown-elf %s -### -o %t.o -mabi=ilp32e 2>&1 \
+// RUN: %clang --target=riscv32-unknown-elf %s -### -mabi=ilp32e 2>&1 \
 // RUN:   | FileCheck -check-prefix=CHECK-ILP32E %s
-// RUN: %clang -target riscv32-unknown-elf %s -### -o %t.o -march=rv32e 2>&1 \
+// RUN: %clang --target=riscv32-unknown-elf %s -### -march=rv32e 2>&1 \
 // RUN:   | FileCheck -check-prefix=CHECK-ILP32E %s
 
 // CHECK-ILP32E: "-target-abi" "ilp32e"
 
-// RUN: %clang -target riscv32-unknown-elf %s -### -o %t.o -march=rv32if -mabi=ilp32f 2>&1 \
+// RUN: %clang --target=riscv32-unknown-elf %s -### -march=rv32if -mabi=ilp32f 2>&1 \
 // RUN:   | FileCheck -check-prefix=CHECK-ILP32F %s
 
 // CHECK-ILP32F: "-target-abi" "ilp32f"
 
-// RUN: %clang -target riscv32-unknown-elf %s -### -o %t.o -march=rv32ifd -mabi=ilp32d 2>&1 \
+// RUN: %clang --target=riscv32-unknown-elf %s -### -march=rv32ifd -mabi=ilp32d 2>&1 \
 // RUN:   | FileCheck -check-prefix=CHECK-ILP32D %s
-// RUN: %clang -target riscv32-unknown-elf %s -### -o %t.o -march=rv32ifd 2>&1 \
+// RUN: %clang --target=riscv32-unknown-elf %s -### -march=rv32ifd 2>&1 \
 // RUN:   | FileCheck -check-prefix=CHECK-ILP32D %s
-// RUN: %clang -target riscv32-unknown-elf %s -### -o %t.o -march=rv32g 2>&1 \
+// RUN: %clang --target=riscv32-unknown-elf %s -### -march=rv32g 2>&1 \
 // RUN:   | FileCheck -check-prefix=CHECK-ILP32D %s
-// RUN: %clang -target riscv32-unknown-linux-gnu %s -### -o %t.o 2>&1 \
+// RUN: %clang --target=riscv32-unknown-linux-gnu %s -### 2>&1 \
 // RUN:   | FileCheck -check-prefix=CHECK-ILP32D %s
-// RUN: %clang -target riscv32-unknown-linux-gnu -x assembler %s -### -o %t.o 2>&1 \
+// RUN: %clang --target=riscv32-unknown-linux-gnu -x assembler %s -### 2>&1 \
 // RUN:   | FileCheck -check-prefix=CHECK-ILP32D %s
 
 // CHECK-ILP32D: "-target-abi" "ilp32d"
 
-// RUN: not %clang -target riscv32-unknown-elf %s -o %t.o -mabi=lp64 2>&1 \
+// RUN: not %clang --target=riscv32-unknown-elf %s -o %t.o -mabi=lp64 2>&1 \
 // RUN:   | FileCheck -check-prefix=CHECK-RV32-LP64 %s
 
 // CHECK-RV32-LP64: error: unknown target ABI 'lp64'
 
-// RUN: %clang -target riscv64-unknown-elf %s -### -o %t.o 2>&1 \
+// RUN: %clang --target=riscv64-unknown-elf %s -### 2>&1 \
 // RUN:   | FileCheck -check-prefix=CHECK-LP64 %s
-// RUN: %clang -target riscv64-unknown-elf %s -### -o %t.o -mabi=lp64 2>&1 \
+// RUN: %clang --target=riscv64-unknown-elf %s -### -mabi=lp64 2>&1 \
 // RUN:   | FileCheck -check-prefix=CHECK-LP64 %s
-// RUN: %clang -target riscv64-unknown-elf %s -### -o %t.o -march=rv64imc 2>&1 \
+// RUN: %clang --target=riscv64-unknown-elf %s -### -march=rv64imc 2>&1 \
 // RUN:   | FileCheck -check-prefix=CHECK-LP64 %s
-// RUN: %clang -target riscv64-unknown-elf %s -### -o %t.o -march=rv64imf 2>&1 \
+// RUN: %clang --target=riscv64-unknown-elf %s -### -march=rv64imf 2>&1 \
 // RUN:   | FileCheck -check-prefix=CHECK-LP64 %s
-// RUN: %clang -target riscv64-unknown-elf -x assembler %s -### -o %t.o 2>&1 \
+// RUN: %clang --target=riscv64-unknown-elf -x assembler %s -### 2>&1 \
 // RUN:   | FileCheck -check-prefix=CHECK-LP64  %s
-// RUN: %clang -target riscv64-unknown-elf -x assembler %s -### -o %t.o \
+// RUN: %clang --target=riscv64-unknown-elf -x assembler %s -### \
 // RUN:   -mabi=lp64 2>&1 | FileCheck -check-prefix=CHECK-LP64 %s
 
 // CHECK-LP64: "-target-abi" "lp64"
 
-// RUN:  %clang -target riscv64-unknown-elf %s -### -o %t.o -march=rv64f -mabi=lp64f 2>&1 \
+// RUN:  %clang --target=riscv64-unknown-elf %s -### -march=rv64f -mabi=lp64f 2>&1 \
 // RUN:   | FileCheck -check-prefix=CHECK-LP64F %s
 
 // CHECK-LP64F: "-target-abi" "lp64f"
 
-// RUN: %clang -target riscv64-unknown-elf %s -### -o %t.o -march=rv64ifd -mabi=lp64d 2>&1 \
+// RUN: %clang --target=riscv64-unknown-elf %s -### -march=rv64ifd -mabi=lp64d 2>&1 \
 // RUN:   | FileCheck -check-prefix=CHECK-LP64D %s
-// RUN: %clang -target riscv64-unknown-elf %s -### -o %t.o -march=rv64ifd 2>&1 \
+// RUN: %clang --target=riscv64-unknown-elf %s -### -march=rv64ifd 2>&1 \
 // RUN:   | FileCheck -check-prefix=CHECK-LP64D %s
-// RUN: %clang -target riscv64-unknown-elf %s -### -o %t.o -march=rv64g 2>&1 \
+// RUN: %clang --target=riscv64-unknown-elf %s -### -march=rv64g 2>&1 \
 // RUN:   | FileCheck -check-prefix=CHECK-LP64D %s
-// RUN: %clang -target riscv64-unknown-linux-gnu %s -### -o %t.o 2>&1 \
+// RUN: %clang --target=riscv64-unknown-linux-gnu %s -### 2>&1 \
 // RUN:   | FileCheck -check-prefix=CHECK-LP64D %s
-// RUN: %clang -target riscv64-unknown-linux-gnu -x assembler %s -### -o %t.o 2>&1 \
+// RUN: %clang --target=riscv64-unknown-linux-gnu -x assembler %s -### 2>&1 \
 // RUN:   | FileCheck -check-prefix=CHECK-LP64D  %s
 
 // CHECK-LP64D: "-target-abi" "lp64d"
 
-// RUN: not %clang -target riscv64-unknown-elf %s -o %t.o -mabi=ilp32 2>&1 \
+// RUN: not %clang --target=riscv64-unknown-elf %s -o %t.o -mabi=ilp32 2>&1 \
 // RUN:   | FileCheck -check-prefix=CHECK-RV64-ILP32 %s
 
 // CHECK-RV64-ILP32: error: unknown target ABI 'ilp32'

diff  --git a/clang/test/Driver/riscv-arch.c b/clang/test/Driver/riscv-arch.c
index e407c7f9bf13e..46cab6384ab97 100644
--- a/clang/test/Driver/riscv-arch.c
+++ b/clang/test/Driver/riscv-arch.c
@@ -1,47 +1,47 @@
-// RUN: %clang -target riscv32-unknown-elf -march=rv32i -### %s \
+// RUN: %clang --target=riscv32-unknown-elf -march=rv32i -### %s \
 // RUN: -fsyntax-only 2>&1 | FileCheck %s
-// RUN: %clang -target riscv32-unknown-elf -march=rv32i2p0 -### %s \
+// RUN: %clang --target=riscv32-unknown-elf -march=rv32i2p0 -### %s \
 // RUN: -fsyntax-only 2>&1 | FileCheck %s
-// RUN: %clang -target riscv32-unknown-elf -march=rv32im -### %s \
+// RUN: %clang --target=riscv32-unknown-elf -march=rv32im -### %s \
 // RUN: -fsyntax-only 2>&1 | FileCheck %s
-// RUN: %clang -target riscv32-unknown-elf -march=rv32ima -### %s \
+// RUN: %clang --target=riscv32-unknown-elf -march=rv32ima -### %s \
 // RUN: -fsyntax-only 2>&1 | FileCheck %s
-// RUN: %clang -target riscv32-unknown-elf -march=rv32imaf -### %s \
+// RUN: %clang --target=riscv32-unknown-elf -march=rv32imaf -### %s \
 // RUN: -fsyntax-only 2>&1 | FileCheck %s
-// RUN: %clang -target riscv32-unknown-elf -march=rv32imafd -### %s \
+// RUN: %clang --target=riscv32-unknown-elf -march=rv32imafd -### %s \
 // RUN: -fsyntax-only 2>&1 | FileCheck %s
 
-// RUN: %clang -target riscv32-unknown-elf -march=rv32ic -### %s \
+// RUN: %clang --target=riscv32-unknown-elf -march=rv32ic -### %s \
 // RUN: -fsyntax-only 2>&1 | FileCheck %s
-// RUN: %clang -target riscv32-unknown-elf -march=rv32imc -### %s \
+// RUN: %clang --target=riscv32-unknown-elf -march=rv32imc -### %s \
 // RUN: -fsyntax-only 2>&1 | FileCheck %s
-// RUN: %clang -target riscv32-unknown-elf -march=rv32imac -### %s \
+// RUN: %clang --target=riscv32-unknown-elf -march=rv32imac -### %s \
 // RUN: -fsyntax-only 2>&1 | FileCheck %s
-// RUN: %clang -target riscv32-unknown-elf -march=rv32imafc -### %s \
+// RUN: %clang --target=riscv32-unknown-elf -march=rv32imafc -### %s \
 // RUN: -fsyntax-only 2>&1 | FileCheck %s
-// RUN: %clang -target riscv32-unknown-elf -march=rv32imafdc -### %s \
+// RUN: %clang --target=riscv32-unknown-elf -march=rv32imafdc -### %s \
 // RUN: -fsyntax-only 2>&1 | FileCheck %s
 
-// RUN: %clang -target riscv32-unknown-elf -march=rv32ia -### %s \
+// RUN: %clang --target=riscv32-unknown-elf -march=rv32ia -### %s \
 // RUN: -fsyntax-only 2>&1 | FileCheck %s
-// RUN: %clang -target riscv32-unknown-elf -march=rv32iaf -### %s \
+// RUN: %clang --target=riscv32-unknown-elf -march=rv32iaf -### %s \
 // RUN: -fsyntax-only 2>&1 | FileCheck %s
-// RUN: %clang -target riscv32-unknown-elf -march=rv32iafd -### %s \
+// RUN: %clang --target=riscv32-unknown-elf -march=rv32iafd -### %s \
 // RUN: -fsyntax-only 2>&1 | FileCheck %s
 
-// RUN: %clang -target riscv32-unknown-elf -march=rv32iac -### %s \
+// RUN: %clang --target=riscv32-unknown-elf -march=rv32iac -### %s \
 // RUN: -fsyntax-only 2>&1 | FileCheck %s
-// RUN: %clang -target riscv32-unknown-elf -march=rv32iafc -### %s \
+// RUN: %clang --target=riscv32-unknown-elf -march=rv32iafc -### %s \
 // RUN: -fsyntax-only 2>&1 | FileCheck %s
-// RUN: %clang -target riscv32-unknown-elf -march=rv32iafdc -### %s \
+// RUN: %clang --target=riscv32-unknown-elf -march=rv32iafdc -### %s \
 // RUN: -fsyntax-only 2>&1 | FileCheck %s
 
-// RUN: %clang -target riscv32-unknown-elf -march=rv32g -### %s \
+// RUN: %clang --target=riscv32-unknown-elf -march=rv32g -### %s \
 // RUN: -fsyntax-only 2>&1 | FileCheck %s
-// RUN: %clang -target riscv32-unknown-elf -march=rv32gc -### %s \
+// RUN: %clang --target=riscv32-unknown-elf -march=rv32gc -### %s \
 // RUN: -fsyntax-only 2>&1 | FileCheck %s
 
-// RUN: %clang -target riscv32-unknown-elf -mabi=ilp32 -### %s \
+// RUN: %clang --target=riscv32-unknown-elf -mabi=ilp32 -### %s \
 // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=CHECK-ILP32 %s
 
 // CHECK-ILP32:      "-target-feature" "+m"
@@ -50,7 +50,7 @@
 // CHECK-ILP32-SAME: {{^}} "-target-feature" "+d"
 // CHECK-ILP32-SAME: {{^}} "-target-feature" "+c"
 
-// RUN: %clang -target riscv32-unknown-elf -mabi=ilp32f -### %s \
+// RUN: %clang --target=riscv32-unknown-elf -mabi=ilp32f -### %s \
 // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=CHECK-ILP32F %s
 
 // CHECK-ILP32F:      "-target-feature" "+m"
@@ -59,7 +59,7 @@
 // CHECK-ILP32F-SAME: {{^}} "-target-feature" "+d"
 // CHECK-ILP32F-SAME: {{^}} "-target-feature" "+c"
 
-// RUN: %clang -target riscv32-unknown-elf -mabi=ilp32d -### %s \
+// RUN: %clang --target=riscv32-unknown-elf -mabi=ilp32d -### %s \
 // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=CHECK-ILP32D %s
 
 // CHECK-ILP32D:      "-target-feature" "+m"
@@ -68,50 +68,50 @@
 // CHECK-ILP32D-SAME: {{^}} "-target-feature" "+d"
 // CHECK-ILP32D-SAME: {{^}} "-target-feature" "+c"
 
-// RUN: %clang -target riscv64-unknown-elf -march=rv64i -### %s \
+// RUN: %clang --target=riscv64-unknown-elf -march=rv64i -### %s \
 // RUN: -fsyntax-only 2>&1 | FileCheck %s
-// RUN: %clang -target riscv64-unknown-elf -march=rv64i2p0 -### %s \
+// RUN: %clang --target=riscv64-unknown-elf -march=rv64i2p0 -### %s \
 // RUN: -fsyntax-only 2>&1 | FileCheck %s
-// RUN: %clang -target riscv64-unknown-elf -march=rv64im -### %s \
+// RUN: %clang --target=riscv64-unknown-elf -march=rv64im -### %s \
 // RUN: -fsyntax-only 2>&1 | FileCheck %s
-// RUN: %clang -target riscv64-unknown-elf -march=rv64ima -### %s \
+// RUN: %clang --target=riscv64-unknown-elf -march=rv64ima -### %s \
 // RUN: -fsyntax-only 2>&1 | FileCheck %s
-// RUN: %clang -target riscv64-unknown-elf -march=rv64imaf -### %s \
+// RUN: %clang --target=riscv64-unknown-elf -march=rv64imaf -### %s \
 // RUN: -fsyntax-only 2>&1 | FileCheck %s
-// RUN: %clang -target riscv64-unknown-elf -march=rv64imafd -### %s \
+// RUN: %clang --target=riscv64-unknown-elf -march=rv64imafd -### %s \
 // RUN: -fsyntax-only 2>&1 | FileCheck %s
 
-// RUN: %clang -target riscv64-unknown-elf -march=rv64ic -### %s \
+// RUN: %clang --target=riscv64-unknown-elf -march=rv64ic -### %s \
 // RUN: -fsyntax-only 2>&1 | FileCheck %s
-// RUN: %clang -target riscv64-unknown-elf -march=rv64imc -### %s \
+// RUN: %clang --target=riscv64-unknown-elf -march=rv64imc -### %s \
 // RUN: -fsyntax-only 2>&1 | FileCheck %s
-// RUN: %clang -target riscv64-unknown-elf -march=rv64imac -### %s \
+// RUN: %clang --target=riscv64-unknown-elf -march=rv64imac -### %s \
 // RUN: -fsyntax-only 2>&1 | FileCheck %s
-// RUN: %clang -target riscv64-unknown-elf -march=rv64imafc -### %s \
+// RUN: %clang --target=riscv64-unknown-elf -march=rv64imafc -### %s \
 // RUN: -fsyntax-only 2>&1 | FileCheck %s
-// RUN: %clang -target riscv64-unknown-elf -march=rv64imafdc -### %s \
+// RUN: %clang --target=riscv64-unknown-elf -march=rv64imafdc -### %s \
 // RUN: -fsyntax-only 2>&1 | FileCheck %s
 
-// RUN: %clang -target riscv64-unknown-elf -march=rv64ia -### %s \
+// RUN: %clang --target=riscv64-unknown-elf -march=rv64ia -### %s \
 // RUN: -fsyntax-only 2>&1 | FileCheck %s
-// RUN: %clang -target riscv64-unknown-elf -march=rv64iaf -### %s \
+// RUN: %clang --target=riscv64-unknown-elf -march=rv64iaf -### %s \
 // RUN: -fsyntax-only 2>&1 | FileCheck %s
-// RUN: %clang -target riscv64-unknown-elf -march=rv64iafd -### %s \
+// RUN: %clang --target=riscv64-unknown-elf -march=rv64iafd -### %s \
 // RUN: -fsyntax-only 2>&1 | FileCheck %s
 
-// RUN: %clang -target riscv64-unknown-elf -march=rv64iac -### %s \
+// RUN: %clang --target=riscv64-unknown-elf -march=rv64iac -### %s \
 // RUN: -fsyntax-only 2>&1 | FileCheck %s
-// RUN: %clang -target riscv64-unknown-elf -march=rv64iafc -### %s \
+// RUN: %clang --target=riscv64-unknown-elf -march=rv64iafc -### %s \
 // RUN: -fsyntax-only 2>&1 | FileCheck %s
-// RUN: %clang -target riscv64-unknown-elf -march=rv64iafdc -### %s \
+// RUN: %clang --target=riscv64-unknown-elf -march=rv64iafdc -### %s \
 // RUN: -fsyntax-only 2>&1 | FileCheck %s
 
-// RUN: %clang -target riscv64-unknown-elf -march=rv64g -### %s \
+// RUN: %clang --target=riscv64-unknown-elf -march=rv64g -### %s \
 // RUN: -fsyntax-only 2>&1 | FileCheck %s
-// RUN: %clang -target riscv64-unknown-elf -march=rv64gc -### %s \
+// RUN: %clang --target=riscv64-unknown-elf -march=rv64gc -### %s \
 // RUN: -fsyntax-only 2>&1 | FileCheck %s
 
-// RUN: %clang -target riscv64-unknown-elf -mabi=lp64 -### %s \
+// RUN: %clang --target=riscv64-unknown-elf -mabi=lp64 -### %s \
 // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=CHECK-LP64 %s
 
 // CHECK-LP64: "-target-feature" "+m"
@@ -120,7 +120,7 @@
 // CHECK-LP64-SAME: {{^}} "-target-feature" "+d"
 // CHECK-LP64-SAME: {{^}} "-target-feature" "+c"
 
-// RUN: %clang -target riscv64-unknown-elf -mabi=lp64f -### %s \
+// RUN: %clang --target=riscv64-unknown-elf -mabi=lp64f -### %s \
 // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=CHECK-LP64F %s
 
 // CHECK-LP64F: "-target-feature" "+m"
@@ -129,7 +129,7 @@
 // CHECK-LP64F-SAME: {{^}} "-target-feature" "+d"
 // CHECK-LP64F-SAME: {{^}} "-target-feature" "+c"
 
-// RUN: %clang -target riscv64-unknown-elf -mabi=lp64d -### %s \
+// RUN: %clang --target=riscv64-unknown-elf -mabi=lp64d -### %s \
 // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=CHECK-LP64D %s
 
 // CHECK-LP64D: "-target-feature" "+m"
@@ -140,358 +140,357 @@
 
 // CHECK-NOT: error: invalid arch name '
 
-// RUN: %clang -target riscv32-unknown-elf -march=rv32 -### %s \
+// RUN: %clang --target=riscv32-unknown-elf -march=rv32 -### %s \
 // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32 %s
 // RV32: error: invalid arch name 'rv32'
 
-// RUN: %clang -target riscv32-unknown-elf -march=rv32m -### %s \
+// RUN: %clang --target=riscv32-unknown-elf -march=rv32m -### %s \
 // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32M %s
 // RV32M: error: invalid arch name 'rv32m'
 
-// RUN: %clang -target riscv32-unknown-elf -march=rv32id -### %s \
+// RUN: %clang --target=riscv32-unknown-elf -march=rv32id -### %s \
 // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32ID %s
 // RV32ID: error: invalid arch name 'rv32id'
 
-// RUN: %clang -target riscv32-unknown-elf -march=rv32l -### %s \
+// RUN: %clang --target=riscv32-unknown-elf -march=rv32l -### %s \
 // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32L %s
 // RV32L: error: invalid arch name 'rv32l'
 
-// RUN: %clang -target riscv32-unknown-elf -march=rv32imadf -### %s \
+// RUN: %clang --target=riscv32-unknown-elf -march=rv32imadf -### %s \
 // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32IMADF %s
 // RV32IMADF: error: invalid arch name 'rv32imadf'
 
-// RUN: %clang -target riscv32-unknown-elf -march=rv32imm -### %s \
+// RUN: %clang --target=riscv32-unknown-elf -march=rv32imm -### %s \
 // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32IMM %s
 // RV32IMM: error: invalid arch name 'rv32imm'
 
-// RUN: %clang -target riscv32-unknown-elf -march=RV32I -### %s \
+// RUN: %clang --target=riscv32-unknown-elf -march=RV32I -### %s \
 // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32I-UPPER %s
 // RV32I-UPPER: error: invalid arch name 'RV32I'
 
-// RUN: %clang -target riscv64-unknown-elf -march=rv64 -### %s \
+// RUN: %clang --target=riscv64-unknown-elf -march=rv64 -### %s \
 // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV64 %s
 // RV64: error: invalid arch name 'rv64'
 
-// RUN: %clang -target riscv64-unknown-elf -march=rv64m -### %s \
+// RUN: %clang --target=riscv64-unknown-elf -march=rv64m -### %s \
 // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV64M %s
 // RV64M: error: invalid arch name 'rv64m'
 
-// RUN: %clang -target riscv64-unknown-elf -march=rv64id -### %s \
+// RUN: %clang --target=riscv64-unknown-elf -march=rv64id -### %s \
 // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV64ID %s
 // RV64ID: error: invalid arch name 'rv64id'
 
-// RUN: %clang -target riscv64-unknown-elf -march=rv64l -### %s \
+// RUN: %clang --target=riscv64-unknown-elf -march=rv64l -### %s \
 // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV64L %s
 // RV64L: error: invalid arch name 'rv64l'
 
-// RUN: %clang -target riscv64-unknown-elf -march=rv64imadf -### %s \
+// RUN: %clang --target=riscv64-unknown-elf -march=rv64imadf -### %s \
 // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV64IMADF %s
 // RV64IMADF: error: invalid arch name 'rv64imadf'
 
-// RUN: %clang -target riscv64-unknown-elf -march=rv64imm -### %s \
+// RUN: %clang --target=riscv64-unknown-elf -march=rv64imm -### %s \
 // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV64IMM %s
 // RV64IMM: error: invalid arch name 'rv64imm'
 
-// RUN: %clang -target riscv64-unknown-elf -march=RV64I -### %s \
+// RUN: %clang --target=riscv64-unknown-elf -march=RV64I -### %s \
 // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV64I-UPPER %s
 // RV64I-UPPER: error: invalid arch name 'RV64I'
 
-
 // Testing specific messages and unsupported extensions.
 
-// RUN: %clang -target riscv64-unknown-elf -march=rv64e -### %s \
+// RUN: %clang --target=riscv64-unknown-elf -march=rv64e -### %s \
 // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV64E %s
 // RV64E: error: invalid arch name 'rv64e',
 // RV64E: standard user-level extension 'e' requires 'rv32'
 
-// RUN: %clang -target riscv32-unknown-elf -march=rv32imC -### %s \
+// RUN: %clang --target=riscv32-unknown-elf -march=rv32imC -### %s \
 // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-LOWER %s
 // RV32-LOWER: error: invalid arch name 'rv32imC',
 // RV32-LOWER: string must be lowercase
 
-// RUN: %clang -target riscv32-unknown-elf -march=unknown -### %s \
+// RUN: %clang --target=riscv32-unknown-elf -march=unknown -### %s \
 // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-STR %s
 // RV32-STR: error: invalid arch name 'unknown',
 // RV32-STR: string must begin with rv32{i,e,g} or rv64{i,g}
 
-// RUN: %clang -target riscv32-unknown-elf -march=rv32q -### %s \
+// RUN: %clang --target=riscv32-unknown-elf -march=rv32q -### %s \
 // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-LETTER %s
 // RV32-LETTER: error: invalid arch name 'rv32q',
 // RV32-LETTER: first letter should be 'e', 'i' or 'g'
 
-// RUN: %clang -target riscv32-unknown-elf -march=rv32imcq -### %s \
+// RUN: %clang --target=riscv32-unknown-elf -march=rv32imcq -### %s \
 // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-ORDER %s
 // RV32-ORDER: error: invalid arch name 'rv32imcq',
 // RV32-ORDER: standard user-level extension not given in canonical order 'q'
 
-// RUN: %clang -target riscv32-unknown-elf -march=rv64e -### %s \
+// RUN: %clang --target=riscv32-unknown-elf -march=rv64e -### %s \
 // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV64-EER %s
 // RV64-EER: error: invalid arch name 'rv64e',
 // RV64-EER: standard user-level extension 'e' requires 'rv32'
 
-// RUN: %clang -target riscv32-unknown-elf -march=rv32id -### %s \
+// RUN: %clang --target=riscv32-unknown-elf -march=rv32id -### %s \
 // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-DER %s
 // RV32-DER: error: invalid arch name 'rv32id',
 // RV32-DER: d requires f extension to also be specified
 
-// RUN: %clang -target riscv32-unknown-elf -march=rv32izve32f -### %s \
+// RUN: %clang --target=riscv32-unknown-elf -march=rv32izve32f -### %s \
 // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-ZVE32F-ER %s
 // RV32-ZVE32F-ER: error: invalid arch name 'rv32izve32f',
 // RV32-ZVE32F-ER: zve32f requires f or zfinx extension to also be specified
 
-// RUN: %clang -target riscv32-unknown-elf -march=rv32ifzve64d -### %s \
+// RUN: %clang --target=riscv32-unknown-elf -march=rv32ifzve64d -### %s \
 // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-ZVE64D-ER %s
 // RV32-ZVE64D-ER: error: invalid arch name 'rv32ifzve64d',
 // RV32-ZVE64D-ER: zve64d requires d or zdinx extension to also be specified
 
-// RUN: %clang -target riscv32-unknown-elf -march=rv32izvl64b -### %s \
+// RUN: %clang --target=riscv32-unknown-elf -march=rv32izvl64b -### %s \
 // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-ZVL64B-ER %s
 // RV32-ZVL64B-ER: error: invalid arch name 'rv32izvl64b',
 // RV32-ZVL64B-ER: zvl*b requires v or zve* extension to also be specified
 
-// RUN: %clang -target riscv32-unknown-elf -march=rv32imw -### %s \
+// RUN: %clang --target=riscv32-unknown-elf -march=rv32imw -### %s \
 // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-STD-INVAL %s
 // RV32-STD-INVAL: error: invalid arch name 'rv32imw',
 // RV32-STD-INVAL: invalid standard user-level extension 'w'
 
-// RUN: %clang -target riscv32-unknown-elf -march=rv32imqc -### %s \
+// RUN: %clang --target=riscv32-unknown-elf -march=rv32imqc -### %s \
 // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-STD %s
 // RV32-STD: error: invalid arch name 'rv32imqc',
 // RV32-STD: unsupported standard user-level extension 'q'
 
-// RUN: %clang -target riscv32-unknown-elf -march=rv32xabc -### %s \
+// RUN: %clang --target=riscv32-unknown-elf -march=rv32xabc -### %s \
 // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32X %s
 // RV32X: error: invalid arch name 'rv32xabc',
 // RV32X: first letter should be 'e', 'i' or 'g'
 
-// RUN: %clang -target riscv32-unknown-elf -march=rv32sxabc -### %s \
+// RUN: %clang --target=riscv32-unknown-elf -march=rv32sxabc -### %s \
 // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32SX %s
 // RV32SX: error: invalid arch name 'rv32sxabc',
 // RV32SX: first letter should be 'e', 'i' or 'g'
 
-// RUN: %clang -target riscv32-unknown-elf -march=rv32sabc -### %s \
+// RUN: %clang --target=riscv32-unknown-elf -march=rv32sabc -### %s \
 // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32S %s
 // RV32S: error: invalid arch name 'rv32sabc',
 // RV32S: first letter should be 'e', 'i' or 'g'
 
-// RUN: %clang -target riscv32-unknown-elf -march=rv32ix -### %s \
+// RUN: %clang --target=riscv32-unknown-elf -march=rv32ix -### %s \
 // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32X-NAME %s
 // RV32X-NAME: error: invalid arch name 'rv32ix',
 // RV32X-NAME: non-standard user-level extension name missing after 'x'
 
-// RUN: %clang -target riscv32-unknown-elf -march=rv32isx -### %s \
+// RUN: %clang --target=riscv32-unknown-elf -march=rv32isx -### %s \
 // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32SX-NAME %s
 // RV32SX-NAME: error: invalid arch name 'rv32isx',
 // RV32SX-NAME: non-standard supervisor-level extension
 // RV32SX-NAME: name missing after 'sx'
 
-// RUN: %clang -target riscv32-unknown-elf -march=rv32is -### %s \
+// RUN: %clang --target=riscv32-unknown-elf -march=rv32is -### %s \
 // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32S-NAME %s
 // RV32S-NAME: error: invalid arch name 'rv32is',
 // RV32S-NAME: standard supervisor-level extension
 // RV32S-NAME: name missing after 's'
 
-// RUN: %clang -target riscv32-unknown-elf -march=rv32ix_s_sx -### %s \
+// RUN: %clang --target=riscv32-unknown-elf -march=rv32ix_s_sx -### %s \
 // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32ALL-NAME %s
 // RV32ALL-NAME: error: invalid arch name 'rv32ix_s_sx',
 // RV32ALL-NAME: non-standard user-level extension
 // RV32ALL-NAME: name missing after 'x'
 
-// RUN: %clang -target riscv32-unknown-elf -march=rv32ixabc -### %s \
+// RUN: %clang --target=riscv32-unknown-elf -march=rv32ixabc -### %s \
 // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32X-UNS %s
 // RV32X-UNS: error: invalid arch name 'rv32ixabc',
 // RV32X-UNS: unsupported non-standard user-level extension 'xabc'
 
-// RUN: %clang -target riscv32-unknown-elf -march=rv32isa -### %s \
+// RUN: %clang --target=riscv32-unknown-elf -march=rv32isa -### %s \
 // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32S-UNS %s
 // RV32S-UNS: error: invalid arch name 'rv32isa',
 // RV32S-UNS: unsupported standard supervisor-level extension 'sa'
 
-// RUN: %clang -target riscv32-unknown-elf -march=rv32isxabc -### %s \
+// RUN: %clang --target=riscv32-unknown-elf -march=rv32isxabc -### %s \
 // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32SX-UNS %s
 // RV32SX-UNS: error: invalid arch name 'rv32isxabc',
 // RV32SX-UNS: unsupported non-standard supervisor-level extension 'sxabc'
 
-// RUN: %clang -target riscv32-unknown-elf -march=rv32ixabc_sp_sxlw -### %s \
+// RUN: %clang --target=riscv32-unknown-elf -march=rv32ixabc_sp_sxlw -### %s \
 // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32ALL %s
 // RV32ALL: error: invalid arch name 'rv32ixabc_sp_sxlw',
 // RV32ALL: unsupported non-standard user-level extension 'xabc'
 
-// RUN: %clang -target riscv32-unknown-elf -march=rv32i20 -### %s \
+// RUN: %clang --target=riscv32-unknown-elf -march=rv32i20 -### %s \
 // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-IVER %s
 // RV32-IVER: error: invalid arch name 'rv32i20', unsupported
 // RV32-IVER: version number 20 for extension 'i'
 
-// RUN: %clang -target riscv32-unknown-elf -march=rv32imc5 -### %s \
+// RUN: %clang --target=riscv32-unknown-elf -march=rv32imc5 -### %s \
 // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-CVER %s
 // RV32-CVER: error: invalid arch name 'rv32imc5', unsupported
 // RV32-CVER: version number 5 for extension 'c'
 
-// RUN: %clang -target riscv32-unknown-elf -march=rv32i2p -### %s \
+// RUN: %clang --target=riscv32-unknown-elf -march=rv32i2p -### %s \
 // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-IMINOR-MISS %s
 // RV32-IMINOR-MISS: error: invalid arch name 'rv32i2p',
 // RV32-IMINOR-MISS: minor version number missing after 'p' for extension 'i'
 
-// RUN: %clang -target riscv32-unknown-elf -march=rv32i2p1 -### %s \
+// RUN: %clang --target=riscv32-unknown-elf -march=rv32i2p1 -### %s \
 // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-IMINOR1 %s
 // RV32-IMINOR1: error: invalid arch name 'rv32i2p1', unsupported
 // RV32-IMINOR1: version number 2.1 for extension 'i'
 
-// RUN: %clang -target riscv32-unknown-elf -march=rv32ixt2p -### %s \
+// RUN: %clang --target=riscv32-unknown-elf -march=rv32ixt2p -### %s \
 // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-XMINOR-MISS %s
 // RV32-XMINOR-MISS: error: invalid arch name 'rv32ixt2p',
 // RV32-XMINOR-MISS: minor version number missing after 'p' for extension 'xt'
 
-// RUN: %clang -target riscv32-unknown-elf -march=rv32ist2p0 -### %s \
+// RUN: %clang --target=riscv32-unknown-elf -march=rv32ist2p0 -### %s \
 // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-SMINOR0 %s
 // RV32-SMINOR0: error: invalid arch name 'rv32ist2p0',
 // RV32-SMINOR0: unsupported version number 2.0 for extension 'st'
 
-// RUN: %clang -target riscv32-unknown-elf -march=rv32isxt2p1 -### %s \
+// RUN: %clang --target=riscv32-unknown-elf -march=rv32isxt2p1 -### %s \
 // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-SXMINOR1 %s
 // RV32-SXMINOR1: error: invalid arch name 'rv32isxt2p1', unsupported
 // RV32-SXMINOR1: version number 2.1 for extension 'sxt'
 
-// RUN: %clang -target riscv32-unknown-elf -march=rv32ixabc_ -### %s \
+// RUN: %clang --target=riscv32-unknown-elf -march=rv32ixabc_ -### %s \
 // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-XSEP %s
 // RV32-XSEP: error: invalid arch name 'rv32ixabc_',
 // RV32-XSEP: extension name missing after separator '_'
 
-// RUN: %clang -target riscv32-unknown-elf -march=rv32ixabc_a -### %s \
+// RUN: %clang --target=riscv32-unknown-elf -march=rv32ixabc_a -### %s \
 // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-PREFIX %s
 // RV32-PREFIX: error: invalid arch name 'rv32ixabc_a',
 // RV32-PREFIX: invalid extension prefix 'a'
 
-// RUN: %clang -target riscv32-unknown-elf -march=rv32isabc_xdef -### %s \
+// RUN: %clang --target=riscv32-unknown-elf -march=rv32isabc_xdef -### %s \
 // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-X-ORDER %s
 // RV32-X-ORDER: error: invalid arch name 'rv32isabc_xdef',
 // RV32-X-ORDER: non-standard user-level extension not given
 // RV32-X-ORDER: in canonical order 'xdef'
 
-// RUN: %clang -target riscv32-unknown-elf -march=rv32isxabc_sdef -### %s \
+// RUN: %clang --target=riscv32-unknown-elf -march=rv32isxabc_sdef -### %s \
 // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-S-ORDER %s
 // RV32-S-ORDER: error: invalid arch name 'rv32isxabc_sdef',
 // RV32-S-ORDER: standard supervisor-level extension not given
 // RV32-S-ORDER: in canonical order 'sdef'
 
-// RUN: %clang -target riscv32-unknown-elf -march=rv32ixabc_xabc -### %s \
+// RUN: %clang --target=riscv32-unknown-elf -march=rv32ixabc_xabc -### %s \
 // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-XDUP %s
 // RV32-XDUP: error: invalid arch name 'rv32ixabc_xabc',
 // RV32-XDUP: duplicated non-standard user-level extension 'xabc'
 
-// RUN: %clang -target riscv32-unknown-elf -march=rv32ixabc_xdef -### %s \
+// RUN: %clang --target=riscv32-unknown-elf -march=rv32ixabc_xdef -### %s \
 // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-X-X-INVAL %s
 // RV32-X-X-INVAL: error: invalid arch name 'rv32ixabc_xdef', unsupported
 // RV32-X-X-INVAL: non-standard user-level extension 'xabc'
 
-// RUN: %clang -target riscv32-unknown-elf -march=rv32ixabc_sdef_sxghi -### %s \
+// RUN: %clang --target=riscv32-unknown-elf -march=rv32ixabc_sdef_sxghi -### %s \
 // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-X-S-SX-INVAL %s
 // RV32-X-S-SX-INVAL: error: invalid arch name 'rv32ixabc_sdef_sxghi',
 // RV32-X-S-SX-INVAL: unsupported non-standard user-level extension 'xabc'
 
-// RUN: %clang -target riscv32-unknown-elf -march=rv32i -### %s \
+// RUN: %clang --target=riscv32-unknown-elf -march=rv32i -### %s \
 // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-TARGET %s
-// RUN: %clang -target riscv64-unknown-elf -march=rv32i -### %s \
+// RUN: %clang --target=riscv64-unknown-elf -march=rv32i -### %s \
 // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-TARGET %s
 // RV32-TARGET: "-triple" "riscv32-unknown-unknown-elf"
 
-// RUN: %clang -target riscv32-unknown-elf -march=rv64i -### %s \
+// RUN: %clang --target=riscv32-unknown-elf -march=rv64i -### %s \
 // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV64-TARGET %s
-// RUN: %clang -target riscv64-unknown-elf -march=rv64i -### %s \
+// RUN: %clang --target=riscv64-unknown-elf -march=rv64i -### %s \
 // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV64-TARGET %s
 // RV64-TARGET: "-triple" "riscv64-unknown-unknown-elf"
 
-// RUN: %clang -target riscv32-unknown-elf -march=rv32ifzfh01p0 -### %s \
+// RUN: %clang --target=riscv32-unknown-elf -march=rv32ifzfh01p0 -### %s \
 // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-ZFH %s
-// RUN: %clang -target riscv32-unknown-elf -march=rv32ifzfh -### %s \
+// RUN: %clang --target=riscv32-unknown-elf -march=rv32ifzfh -### %s \
 // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-ZFH %s
 // RV32-ZFH: "-target-feature" "+zfh"
 
-// RUN: %clang -target riscv32-unknown-elf -march=rv32ifzfhmin01p0 -### %s \
+// RUN: %clang --target=riscv32-unknown-elf -march=rv32ifzfhmin01p0 -### %s \
 // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-ZFHMIN %s
-// RUN: %clang -target riscv32-unknown-elf -march=rv32ifzfhmin -### %s \
+// RUN: %clang --target=riscv32-unknown-elf -march=rv32ifzfhmin -### %s \
 // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-ZFHMIN %s
 // RV32-ZFHMIN: "-target-feature" "+zfhmin"
 
-// RUN: %clang -target riscv32-unknown-elf -march=rv32izbb1p0 -### %s \
+// RUN: %clang --target=riscv32-unknown-elf -march=rv32izbb1p0 -### %s \
 // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-ZBB %s
-// RUN: %clang -target riscv32-unknown-elf -march=rv32izbb -### %s \
+// RUN: %clang --target=riscv32-unknown-elf -march=rv32izbb -### %s \
 // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-ZBB %s
 // RV32-ZBB: "-target-feature" "+zbb"
 
-// RUN: %clang -target riscv32-unknown-elf -march=rv32izbb1p0_zbp0p93 -menable-experimental-extensions -### %s \
+// RUN: %clang --target=riscv32-unknown-elf -march=rv32izbb1p0_zbp0p93 -menable-experimental-extensions -### %s \
 // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-EXPERIMENTAL-ZBB-ZBP %s
 // RV32-EXPERIMENTAL-ZBB-ZBP: "-target-feature" "+zbb"
 // RV32-EXPERIMENTAL-ZBB-ZBP: "-target-feature" "+experimental-zbp"
 
-// RUN: %clang -target riscv32-unknown-elf -march=rv32izbb1p0zbp0p93 -menable-experimental-extensions -### %s \
+// RUN: %clang --target=riscv32-unknown-elf -march=rv32izbb1p0zbp0p93 -menable-experimental-extensions -### %s \
 // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-EXPERIMENTAL-ZBB-ZBP-UNDERSCORE %s
 // RV32-EXPERIMENTAL-ZBB-ZBP-UNDERSCORE: error: invalid arch name 'rv32izbb1p0zbp0p93', unsupported version number 0.93 for extension 'zbb1p0zbp'
 
-// RUN: %clang -target riscv32-unknown-elf -march=rv32izba1p0 -### %s \
+// RUN: %clang --target=riscv32-unknown-elf -march=rv32izba1p0 -### %s \
 // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-ZBA %s
-// RUN: %clang -target riscv32-unknown-elf -march=rv32izba -### %s \
+// RUN: %clang --target=riscv32-unknown-elf -march=rv32izba -### %s \
 // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-ZBA %s
 // RV32-ZBA: "-target-feature" "+zba"
 
-// RUN: %clang -target riscv32-unknown-elf -march=rv32iv0p1 -### %s -c 2>&1 | \
+// RUN: %clang --target=riscv32-unknown-elf -march=rv32iv0p1 -### %s -c 2>&1 | \
 // RUN:   FileCheck -check-prefix=RV32-V-BADVERS %s
 // RV32-V-BADVERS: error: invalid arch name 'rv32iv0p1'
 // RV32-V-BADVERS: unsupported version number 0.1 for extension 'v'
 
-// RUN: %clang -target riscv32-unknown-elf -march=rv32iv1p0 -### %s -c 2>&1 | \
+// RUN: %clang --target=riscv32-unknown-elf -march=rv32iv1p0 -### %s -c 2>&1 | \
 // RUN:   FileCheck -check-prefix=RV32-V-GOODVERS %s
 // RV32-V-GOODVERS: "-target-feature" "+v"
 
-// RUN: %clang -target riscv32-unknown-elf -march=rv32iv1p0_zvl32b0p1 -### %s -c 2>&1 | \
+// RUN: %clang --target=riscv32-unknown-elf -march=rv32iv1p0_zvl32b0p1 -### %s -c 2>&1 | \
 // RUN:   FileCheck -check-prefix=RV32-ZVL-BADVERS %s
 // RV32-ZVL-BADVERS: error: invalid arch name 'rv32iv1p0_zvl32b0p1'
 // RV32-ZVL-BADVERS: unsupported version number 0.1 for extension 'zvl32b'
 
-// RUN: %clang -target riscv32-unknown-elf -march=rv32iv1p0_zvl32b1p0 -### %s -c 2>&1 | \
+// RUN: %clang --target=riscv32-unknown-elf -march=rv32iv1p0_zvl32b1p0 -### %s -c 2>&1 | \
 // RUN:   FileCheck -check-prefix=RV32-ZVL-GOODVERS %s
 // RV32-ZVL-GOODVERS: "-target-feature" "+zvl32b"
 
-// RUN: %clang -target riscv32-unknown-elf -march=rv32izbkc1p0 -### %s \
+// RUN: %clang --target=riscv32-unknown-elf -march=rv32izbkc1p0 -### %s \
 // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-ZBKC %s
 // RV32-ZBKC: "-target-feature" "+zbkc"
 
-// RUN: %clang -target riscv32-unknown-elf -march=rv32izbkx1p0 -### %s \
+// RUN: %clang --target=riscv32-unknown-elf -march=rv32izbkx1p0 -### %s \
 // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-ZBKX %s
 // RV32-ZBKX: "-target-feature" "+zbkx"
 
-// RUN: %clang -target riscv32-unknown-elf -march=rv32izbkb1p0 -### %s \
+// RUN: %clang --target=riscv32-unknown-elf -march=rv32izbkb1p0 -### %s \
 // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-ZBKB %s
 // RV32-ZBKB: "-target-feature" "+zbkb"
 
-// RUN: %clang -target riscv32-unknown-elf -march=rv32izknd1p0 -### %s \
+// RUN: %clang --target=riscv32-unknown-elf -march=rv32izknd1p0 -### %s \
 // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-ZKND %s
 // RV32-ZKND: "-target-feature" "+zknd"
 
-// RUN: %clang -target riscv32-unknown-elf -march=rv32izkne1p0 -### %s \
+// RUN: %clang --target=riscv32-unknown-elf -march=rv32izkne1p0 -### %s \
 // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-ZKNE %s
 // RV32-ZKNE: "-target-feature" "+zkne"
 
-// RUN: %clang -target riscv32-unknown-elf -march=rv32izknh1p0 -### %s \
+// RUN: %clang --target=riscv32-unknown-elf -march=rv32izknh1p0 -### %s \
 // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-ZKNH %s
 // RV32-ZKNH: "-target-feature" "+zknh"
 
-// RUN: %clang -target riscv32-unknown-elf -march=rv32izksed1p0 -### %s \
+// RUN: %clang --target=riscv32-unknown-elf -march=rv32izksed1p0 -### %s \
 // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-ZKSED %s
 // RV32-ZKSED: "-target-feature" "+zksed"
 
-// RUN: %clang -target riscv32-unknown-elf -march=rv32izksh1p0 -### %s \
+// RUN: %clang --target=riscv32-unknown-elf -march=rv32izksh1p0 -### %s \
 // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-ZKSH %s
 // RV32-ZKSH: "-target-feature" "+zksh"
 
-// RUN: %clang -target riscv32-unknown-elf -march=rv32izkr1p0 -### %s \
+// RUN: %clang --target=riscv32-unknown-elf -march=rv32izkr1p0 -### %s \
 // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-ZKR %s
 // RV32-ZKR: "-target-feature" "+zkr"
 
-// RUN: %clang -target riscv32-unknown-elf -march=rv32izkt1p0 -### %s \
+// RUN: %clang --target=riscv32-unknown-elf -march=rv32izkt1p0 -### %s \
 // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-ZKT %s
 // RV32-ZKT: "-target-feature" "+zkt"
 
-// RUN: %clang -target riscv32-unknown-elf -march=rv32izk1p0 -### %s \
+// RUN: %clang --target=riscv32-unknown-elf -march=rv32izk1p0 -### %s \
 // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-ZK %s
 // RV32-ZK: "-target-feature" "+zk"

diff  --git a/clang/test/Driver/riscv-args.c b/clang/test/Driver/riscv-args.c
index 305a50885eade..cab08e5b0f811 100644
--- a/clang/test/Driver/riscv-args.c
+++ b/clang/test/Driver/riscv-args.c
@@ -1,6 +1,6 @@
 // Check the arguments are correctly passed
 
 // Make sure -T is the last with gcc-toolchain option
-// RUN: %clang -### -target riscv32 --gcc-toolchain= -Xlinker --defsym=FOO=10 -T a.lds -u foo %s 2>&1 \
+// RUN: %clang -### --target=riscv32 --gcc-toolchain= -Xlinker --defsym=FOO=10 -T a.lds -u foo %s 2>&1 \
 // RUN:   | FileCheck -check-prefix=CHECK-LD %s
 // CHECK-LD: {{.*}} "--defsym=FOO=10" {{.*}} "-u" "foo" {{.*}} "-T" "a.lds"

diff  --git a/clang/test/Driver/riscv-cpus.c b/clang/test/Driver/riscv-cpus.c
index 444b0aef623a1..0d77408115d6a 100644
--- a/clang/test/Driver/riscv-cpus.c
+++ b/clang/test/Driver/riscv-cpus.c
@@ -1,134 +1,134 @@
 // Check target CPUs are correctly passed.
 
-// RUN: %clang -target riscv32 -### -c %s 2>&1 -mcpu=rocket-rv32 | FileCheck -check-prefix=MCPU-ROCKET32 %s
+// RUN: %clang --target=riscv32 -### -c %s 2>&1 -mcpu=rocket-rv32 | FileCheck -check-prefix=MCPU-ROCKET32 %s
 // MCPU-ROCKET32: "-nostdsysteminc" "-target-cpu" "rocket-rv32"
 
-// RUN: %clang -target riscv64 -### -c %s 2>&1 -mcpu=rocket-rv64 | FileCheck -check-prefix=MCPU-ROCKET64 %s
+// RUN: %clang --target=riscv64 -### -c %s 2>&1 -mcpu=rocket-rv64 | FileCheck -check-prefix=MCPU-ROCKET64 %s
 // MCPU-ROCKET64: "-nostdsysteminc" "-target-cpu" "rocket-rv64"
 // MCPU-ROCKET64: "-target-feature" "+64bit"
 
-// RUN: %clang -target riscv32 -### -c %s 2>&1 -mcpu=sifive-7-rv32 | FileCheck -check-prefix=MCPU-SIFIVE7-32 %s
+// RUN: %clang --target=riscv32 -### -c %s 2>&1 -mcpu=sifive-7-rv32 | FileCheck -check-prefix=MCPU-SIFIVE7-32 %s
 // MCPU-SIFIVE7-32: "-nostdsysteminc" "-target-cpu" "sifive-7-rv32"
 
-// RUN: %clang -target riscv64 -### -c %s 2>&1 -mcpu=sifive-7-rv64 | FileCheck -check-prefix=MCPU-SIFIVE7-64 %s
+// RUN: %clang --target=riscv64 -### -c %s 2>&1 -mcpu=sifive-7-rv64 | FileCheck -check-prefix=MCPU-SIFIVE7-64 %s
 // MCPU-SIFIVE7-64: "-nostdsysteminc" "-target-cpu" "sifive-7-rv64"
 // MCPU-SIFIVE7-64: "-target-feature" "+64bit"
 
-// RUN: %clang -target riscv32 -### -c %s 2>&1 -mtune=rocket-rv32 | FileCheck -check-prefix=MTUNE-ROCKET32 %s
+// RUN: %clang --target=riscv32 -### -c %s 2>&1 -mtune=rocket-rv32 | FileCheck -check-prefix=MTUNE-ROCKET32 %s
 // MTUNE-ROCKET32: "-tune-cpu" "rocket-rv32"
 
-// RUN: %clang -target riscv64 -### -c %s 2>&1 -mtune=rocket-rv64 | FileCheck -check-prefix=MTUNE-ROCKET64 %s
+// RUN: %clang --target=riscv64 -### -c %s 2>&1 -mtune=rocket-rv64 | FileCheck -check-prefix=MTUNE-ROCKET64 %s
 // MTUNE-ROCKET64: "-tune-cpu" "rocket-rv64"
 
-// RUN: %clang -target riscv32 -### -c %s 2>&1 -mtune=sifive-7-rv32 | FileCheck -check-prefix=MTUNE-SIFIVE7-32 %s
+// RUN: %clang --target=riscv32 -### -c %s 2>&1 -mtune=sifive-7-rv32 | FileCheck -check-prefix=MTUNE-SIFIVE7-32 %s
 // MTUNE-SIFIVE7-32: "-tune-cpu" "sifive-7-rv32"
 
-// RUN: %clang -target riscv64 -### -c %s 2>&1 -mtune=sifive-7-rv64 | FileCheck -check-prefix=MTUNE-SIFIVE7-64 %s
+// RUN: %clang --target=riscv64 -### -c %s 2>&1 -mtune=sifive-7-rv64 | FileCheck -check-prefix=MTUNE-SIFIVE7-64 %s
 // MTUNE-SIFIVE7-64: "-tune-cpu" "sifive-7-rv64"
 
 // Check mtune alias CPU has resolved to the right CPU according XLEN.
-// RUN: %clang -target riscv32 -### -c %s 2>&1 -mtune=generic | FileCheck -check-prefix=MTUNE-GENERIC-32 %s
+// RUN: %clang --target=riscv32 -### -c %s 2>&1 -mtune=generic | FileCheck -check-prefix=MTUNE-GENERIC-32 %s
 // MTUNE-GENERIC-32: "-tune-cpu" "generic-rv32"
 
-// RUN: %clang -target riscv64 -### -c %s 2>&1 -mtune=generic | FileCheck -check-prefix=MTUNE-GENERIC-64 %s
+// RUN: %clang --target=riscv64 -### -c %s 2>&1 -mtune=generic | FileCheck -check-prefix=MTUNE-GENERIC-64 %s
 // MTUNE-GENERIC-64: "-tune-cpu" "generic-rv64"
 
-// RUN: %clang -target riscv32 -### -c %s 2>&1 -mtune=rocket | FileCheck -check-prefix=MTUNE-ROCKET-32 %s
+// RUN: %clang --target=riscv32 -### -c %s 2>&1 -mtune=rocket | FileCheck -check-prefix=MTUNE-ROCKET-32 %s
 // MTUNE-ROCKET-32: "-tune-cpu" "rocket-rv32"
 
-// RUN: %clang -target riscv64 -### -c %s 2>&1 -mtune=rocket | FileCheck -check-prefix=MTUNE-ROCKET-64 %s
+// RUN: %clang --target=riscv64 -### -c %s 2>&1 -mtune=rocket | FileCheck -check-prefix=MTUNE-ROCKET-64 %s
 // MTUNE-ROCKET-64: "-tune-cpu" "rocket-rv64"
 
-// RUN: %clang -target riscv32 -### -c %s 2>&1 -mtune=sifive-7-series | FileCheck -check-prefix=MTUNE-SIFIVE7-SERIES-32 %s
+// RUN: %clang --target=riscv32 -### -c %s 2>&1 -mtune=sifive-7-series | FileCheck -check-prefix=MTUNE-SIFIVE7-SERIES-32 %s
 // MTUNE-SIFIVE7-SERIES-32: "-tune-cpu" "sifive-7-rv32"
 
-// RUN: %clang -target riscv64 -### -c %s 2>&1 -mtune=sifive-7-series | FileCheck -check-prefix=MTUNE-SIFIVE7-SERIES-64 %s
+// RUN: %clang --target=riscv64 -### -c %s 2>&1 -mtune=sifive-7-series | FileCheck -check-prefix=MTUNE-SIFIVE7-SERIES-64 %s
 // MTUNE-SIFIVE7-SERIES-64: "-tune-cpu" "sifive-7-rv64"
 
 // mcpu with default march
-// RUN: %clang -target riscv64 -### -c %s 2>&1 -mcpu=sifive-e20 | FileCheck -check-prefix=MCPU-SIFIVE-E20 %s
+// RUN: %clang --target=riscv64 -### -c %s 2>&1 -mcpu=sifive-e20 | FileCheck -check-prefix=MCPU-SIFIVE-E20 %s
 // MCPU-SIFIVE-E20: "-nostdsysteminc" "-target-cpu" "sifive-e20"
 // MCPU-SIFIVE-E20: "-target-feature" "+m" "-target-feature" "+c"
 // MCPU-SIFIVE-E20: "-target-abi" "ilp32"
 
 // mcpu with default march
-// RUN: %clang -target riscv64 -### -c %s 2>&1 -mcpu=sifive-e21 | FileCheck -check-prefix=MCPU-SIFIVE-E21 %s
+// RUN: %clang --target=riscv64 -### -c %s 2>&1 -mcpu=sifive-e21 | FileCheck -check-prefix=MCPU-SIFIVE-E21 %s
 // MCPU-SIFIVE-E21: "-nostdsysteminc" "-target-cpu" "sifive-e21"
 // MCPU-SIFIVE-E21: "-target-feature" "+m" "-target-feature" "+a" "-target-feature" "+c"
 // MCPU-SIFIVE-E21: "-target-abi" "ilp32"
 
 // mcpu with default march
-// RUN: %clang -target riscv64 -### -c %s 2>&1 -mcpu=sifive-e24 | FileCheck -check-prefix=MCPU-SIFIVE-E24 %s
+// RUN: %clang --target=riscv64 -### -c %s 2>&1 -mcpu=sifive-e24 | FileCheck -check-prefix=MCPU-SIFIVE-E24 %s
 // MCPU-SIFIVE-E24: "-nostdsysteminc" "-target-cpu" "sifive-e24"
 // MCPU-SIFIVE-E24: "-target-feature" "+m" "-target-feature" "+a" "-target-feature" "+f"
 // MCPU-SIFIVE-E24: "-target-feature" "+c"
 // MCPU-SIFIVE-E24: "-target-abi" "ilp32"
 
 // mcpu with default march
-// RUN: %clang -target riscv64 -### -c %s 2>&1 -mcpu=sifive-e34 | FileCheck -check-prefix=MCPU-SIFIVE-E34 %s
+// RUN: %clang --target=riscv64 -### -c %s 2>&1 -mcpu=sifive-e34 | FileCheck -check-prefix=MCPU-SIFIVE-E34 %s
 // MCPU-SIFIVE-E34: "-nostdsysteminc" "-target-cpu" "sifive-e34"
 // MCPU-SIFIVE-E34: "-target-feature" "+m" "-target-feature" "+a" "-target-feature" "+f"
 // MCPU-SIFIVE-E34: "-target-feature" "+c"
 // MCPU-SIFIVE-E34: "-target-abi" "ilp32"
 
 // mcpu with mabi option
-// RUN: %clang -target riscv64 -### -c %s 2>&1 -mcpu=sifive-s21 -mabi=lp64 | FileCheck -check-prefix=MCPU-ABI-SIFIVE-S21 %s
+// RUN: %clang --target=riscv64 -### -c %s 2>&1 -mcpu=sifive-s21 -mabi=lp64 | FileCheck -check-prefix=MCPU-ABI-SIFIVE-S21 %s
 // MCPU-ABI-SIFIVE-S21: "-nostdsysteminc" "-target-cpu" "sifive-s21"
 // MCPU-ABI-SIFIVE-S21: "-target-feature" "+m" "-target-feature" "+a"
 // MCPU-ABI-SIFIVE-S21: "-target-feature" "+c" "-target-feature" "+64bit"
 // MCPU-ABI-SIFIVE-S21: "-target-abi" "lp64"
 
 // mcpu with mabi option
-// RUN: %clang -target riscv64 -### -c %s 2>&1 -mcpu=sifive-s51 -mabi=lp64 | FileCheck -check-prefix=MCPU-ABI-SIFIVE-S51 %s
+// RUN: %clang --target=riscv64 -### -c %s 2>&1 -mcpu=sifive-s51 -mabi=lp64 | FileCheck -check-prefix=MCPU-ABI-SIFIVE-S51 %s
 // MCPU-ABI-SIFIVE-S51: "-nostdsysteminc" "-target-cpu" "sifive-s51"
 // MCPU-ABI-SIFIVE-S51: "-target-feature" "+m" "-target-feature" "+a"
 // MCPU-ABI-SIFIVE-S51: "-target-feature" "+c" "-target-feature" "+64bit"
 // MCPU-ABI-SIFIVE-S51: "-target-abi" "lp64"
 
 // mcpu with default march
-// RUN: %clang -target riscv64 -### -c %s 2>&1 -mcpu=sifive-s54 | FileCheck -check-prefix=MCPU-SIFIVE-S54 %s
+// RUN: %clang --target=riscv64 -### -c %s 2>&1 -mcpu=sifive-s54 | FileCheck -check-prefix=MCPU-SIFIVE-S54 %s
 // MCPU-SIFIVE-S54: "-nostdsysteminc" "-target-cpu" "sifive-s54"
 // MCPU-SIFIVE-S54: "-target-feature" "+m" "-target-feature" "+a" "-target-feature" "+f" "-target-feature" "+d"
 // MCPU-SIFIVE-S54: "-target-feature" "+c" "-target-feature" "+64bit"
 // MCPU-SIFIVE-S54: "-target-abi" "lp64d"
 
 // mcpu with mabi option
-// RUN: %clang -target riscv64 -### -c %s 2>&1 -mcpu=sifive-s76 | FileCheck -check-prefix=MCPU-SIFIVE-S76 %s
+// RUN: %clang --target=riscv64 -### -c %s 2>&1 -mcpu=sifive-s76 | FileCheck -check-prefix=MCPU-SIFIVE-S76 %s
 // MCPU-SIFIVE-S76: "-nostdsysteminc" "-target-cpu" "sifive-s76"
 // MCPU-SIFIVE-S76: "-target-feature" "+m" "-target-feature" "+a" "-target-feature" "+f" "-target-feature" "+d"
 // MCPU-SIFIVE-S76: "-target-feature" "+c" "-target-feature" "+64bit"
 // MCPU-SIFIVE-S76: "-target-abi" "lp64d"
 
 // mcpu with default march
-// RUN: %clang -target riscv64 -### -c %s 2>&1 -mcpu=sifive-u54 | FileCheck -check-prefix=MCPU-SIFIVE-U54 %s
+// RUN: %clang --target=riscv64 -### -c %s 2>&1 -mcpu=sifive-u54 | FileCheck -check-prefix=MCPU-SIFIVE-U54 %s
 // MCPU-SIFIVE-U54: "-nostdsysteminc" "-target-cpu" "sifive-u54"
 // MCPU-SIFIVE-U54: "-target-feature" "+m" "-target-feature" "+a" "-target-feature" "+f" "-target-feature" "+d"
 // MCPU-SIFIVE-U54: "-target-feature" "+c" "-target-feature" "+64bit"
 // MCPU-SIFIVE-U54: "-target-abi" "lp64d"
 
 // mcpu with mabi option
-// RUN: %clang -target riscv64 -### -c %s 2>&1 -mcpu=sifive-u54 -mabi=lp64 | FileCheck -check-prefix=MCPU-ABI-SIFIVE-U54 %s
+// RUN: %clang --target=riscv64 -### -c %s 2>&1 -mcpu=sifive-u54 -mabi=lp64 | FileCheck -check-prefix=MCPU-ABI-SIFIVE-U54 %s
 // MCPU-ABI-SIFIVE-U54: "-nostdsysteminc" "-target-cpu" "sifive-u54"
 // MCPU-ABI-SIFIVE-U54: "-target-feature" "+m" "-target-feature" "+a" "-target-feature" "+f" "-target-feature" "+d"
 // MCPU-ABI-SIFIVE-U54: "-target-feature" "+c" "-target-feature" "+64bit"
 // MCPU-ABI-SIFIVE-U54: "-target-abi" "lp64"
 
 // mcpu with default march
-// RUN: %clang -target riscv64 -### -c %s 2>&1 -mcpu=sifive-e76 | FileCheck -check-prefix=MCPU-SIFIVE-E76 %s
+// RUN: %clang --target=riscv64 -### -c %s 2>&1 -mcpu=sifive-e76 | FileCheck -check-prefix=MCPU-SIFIVE-E76 %s
 // MCPU-SIFIVE-E76: "-nostdsysteminc" "-target-cpu" "sifive-e76"
 // MCPU-SIFIVE-E76: "-target-feature" "+m" "-target-feature" "+a" "-target-feature" "+f"
 // MCPU-SIFIVE-E76: "-target-feature" "+c"
 // MCPU-SIFIVE-E76: "-target-abi" "ilp32"
 
 // mcpu with mabi option
-// RUN: %clang -target riscv64 -### -c %s 2>&1 -mcpu=sifive-u74 -mabi=lp64 | FileCheck -check-prefix=MCPU-ABI-SIFIVE-U74 %s
+// RUN: %clang --target=riscv64 -### -c %s 2>&1 -mcpu=sifive-u74 -mabi=lp64 | FileCheck -check-prefix=MCPU-ABI-SIFIVE-U74 %s
 // MCPU-ABI-SIFIVE-U74: "-nostdsysteminc" "-target-cpu" "sifive-u74"
 // MCPU-ABI-SIFIVE-U74: "-target-feature" "+m" "-target-feature" "+a" "-target-feature" "+f" "-target-feature" "+d"
 // MCPU-ABI-SIFIVE-U74: "-target-feature" "+c" "-target-feature" "+64bit"
 // MCPU-ABI-SIFIVE-U74: "-target-abi" "lp64"
 
 // march overwrite mcpu's default march
-// RUN: %clang -target riscv32 -### -c %s 2>&1 -mcpu=sifive-e31 -march=rv32imc | FileCheck -check-prefix=MCPU-MARCH %s
+// RUN: %clang --target=riscv32 -### -c %s 2>&1 -mcpu=sifive-e31 -march=rv32imc | FileCheck -check-prefix=MCPU-MARCH %s
 // MCPU-MARCH: "-nostdsysteminc" "-target-cpu" "sifive-e31" "-target-feature" "+m" "-target-feature" "+c"
 // MCPU-MARCH: "-target-abi" "ilp32"
 
@@ -138,7 +138,7 @@
 // In this case, sifive-e31 is rv32imac, sifive-e76 is rv32imafc, so M-extension
 // should not enabled.
 //
-// RUN: %clang -target riscv32 -### -c %s 2>&1 -mcpu=sifive-e31 -mtune=sifive-e76 | FileCheck -check-prefix=MTUNE-E31-MCPU-E76 %s
+// RUN: %clang --target=riscv32 -### -c %s 2>&1 -mcpu=sifive-e31 -mtune=sifive-e76 | FileCheck -check-prefix=MTUNE-E31-MCPU-E76 %s
 // MTUNE-E31-MCPU-E76: "-target-cpu" "sifive-e31"
 // MTUNE-E31-MCPU-E76-NOT: "-target-feature" "+f"
 // MTUNE-E31-MCPU-E76-SAME: "-target-feature" "+m"
@@ -148,11 +148,11 @@
 
 // Check failed cases
 
-// RUN: %clang -target riscv32 -### -c %s 2>&1 -mcpu=generic-rv321 | FileCheck -check-prefix=FAIL-MCPU-NAME %s
+// RUN: %clang --target=riscv32 -### -c %s 2>&1 -mcpu=generic-rv321 | FileCheck -check-prefix=FAIL-MCPU-NAME %s
 // FAIL-MCPU-NAME: error: the clang compiler does not support '-mcpu=generic-rv321'
 
-// RUN: %clang -target riscv32 -### -c %s 2>&1 -mcpu=generic-rv32 -march=rv64i | FileCheck -check-prefix=MISMATCH-ARCH %s
+// RUN: %clang --target=riscv32 -### -c %s 2>&1 -mcpu=generic-rv32 -march=rv64i | FileCheck -check-prefix=MISMATCH-ARCH %s
 // MISMATCH-ARCH: error: the clang compiler does not support '-mcpu=generic-rv32'
 
-// RUN: %clang -target riscv32 -### -c %s 2>&1 -mcpu=generic-rv64 | FileCheck -check-prefix=MISMATCH-MCPU %s
+// RUN: %clang --target=riscv32 -### -c %s 2>&1 -mcpu=generic-rv64 | FileCheck -check-prefix=MISMATCH-MCPU %s
 // MISMATCH-MCPU: error: the clang compiler does not support '-mcpu=generic-rv64'

diff  --git a/clang/test/Driver/riscv-default-features.c b/clang/test/Driver/riscv-default-features.c
index 0bb65d2430d6b..0415d89c4e6a4 100644
--- a/clang/test/Driver/riscv-default-features.c
+++ b/clang/test/Driver/riscv-default-features.c
@@ -1,5 +1,5 @@
-// RUN: %clang -target riscv32-unknown-elf -S -emit-llvm %s -o - | FileCheck %s -check-prefix=RV32
-// RUN: %clang -target riscv64-unknown-elf -S -emit-llvm %s -o - | FileCheck %s -check-prefix=RV64
+// RUN: %clang --target=riscv32-unknown-elf -S -emit-llvm %s -o - | FileCheck %s -check-prefix=RV32
+// RUN: %clang --target=riscv64-unknown-elf -S -emit-llvm %s -o - | FileCheck %s -check-prefix=RV64
 
 // RV32: "target-features"="+a,+c,+m,+relax,-save-restore"
 // RV64: "target-features"="+64bit,+a,+c,+m,+relax,-save-restore"

diff  --git a/clang/test/Driver/riscv-features.c b/clang/test/Driver/riscv-features.c
index 0686e28459544..3068ae74760ba 100644
--- a/clang/test/Driver/riscv-features.c
+++ b/clang/test/Driver/riscv-features.c
@@ -1,29 +1,29 @@
-// 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
+// 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 2>&1 | FileCheck %s -check-prefix=DEFAULT
+// RUN: %clang --target=riscv32-unknown-elf -### %s 2>&1 | FileCheck %s -check-prefix=DEFAULT
 
-// 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 -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
 
 // RELAX: "-target-feature" "+relax"
 // NO-RELAX: "-target-feature" "-relax"
 // DEFAULT: "-target-feature" "+relax"
 // DEFAULT-NOT: "-target-feature" "-relax"
 
-// RUN: %clang -target riscv32-unknown-elf -### %s -msave-restore 2>&1 | FileCheck %s -check-prefix=SAVE-RESTORE
-// RUN: %clang -target riscv32-unknown-elf -### %s -mno-save-restore 2>&1 | FileCheck %s -check-prefix=NO-SAVE-RESTORE
+// RUN: %clang --target=riscv32-unknown-elf -### %s -msave-restore 2>&1 | FileCheck %s -check-prefix=SAVE-RESTORE
+// RUN: %clang --target=riscv32-unknown-elf -### %s -mno-save-restore 2>&1 | FileCheck %s -check-prefix=NO-SAVE-RESTORE
 
 // SAVE-RESTORE: "-target-feature" "+save-restore"
 // NO-SAVE-RESTORE: "-target-feature" "-save-restore"
 // DEFAULT: "-target-feature" "-save-restore"
 // DEFAULT-NOT: "-target-feature" "+save-restore"
 
-// RUN: %clang -target riscv32-linux -### %s -fsyntax-only 2>&1 \
+// RUN: %clang --target=riscv32-linux -### %s -fsyntax-only 2>&1 \
 // RUN:   | FileCheck %s -check-prefix=DEFAULT-LINUX
-// RUN: %clang -target riscv64-linux -### %s -fsyntax-only 2>&1 \
+// RUN: %clang --target=riscv64-linux -### %s -fsyntax-only 2>&1 \
 // RUN:   | FileCheck %s -check-prefix=DEFAULT-LINUX
 
 // DEFAULT-LINUX: "-target-feature" "+m"

diff  --git a/clang/test/Driver/riscv-fixed-x-register.c b/clang/test/Driver/riscv-fixed-x-register.c
index 79df4d93abd44..5759cd5ccf707 100644
--- a/clang/test/Driver/riscv-fixed-x-register.c
+++ b/clang/test/Driver/riscv-fixed-x-register.c
@@ -1,191 +1,191 @@
-// RUN: %clang -target riscv32 -ffixed-x1 -### %s 2> %t
+// RUN: %clang --target=riscv32 -ffixed-x1 -### %s 2> %t
 // RUN: FileCheck --check-prefix=CHECK-FIXED-X1 < %t %s
-// RUN: %clang -target riscv64 -ffixed-x1 -### %s 2> %t
+// RUN: %clang --target=riscv64 -ffixed-x1 -### %s 2> %t
 // RUN: FileCheck --check-prefix=CHECK-FIXED-X1 < %t %s
 // CHECK-FIXED-X1: "-target-feature" "+reserve-x1"
 
-// RUN: %clang -target riscv32 -ffixed-x2 -### %s 2> %t
+// RUN: %clang --target=riscv32 -ffixed-x2 -### %s 2> %t
 // RUN: FileCheck --check-prefix=CHECK-FIXED-X2 < %t %s
-// RUN: %clang -target riscv64 -ffixed-x2 -### %s 2> %t
+// RUN: %clang --target=riscv64 -ffixed-x2 -### %s 2> %t
 // RUN: FileCheck --check-prefix=CHECK-FIXED-X2 < %t %s
 // CHECK-FIXED-X2: "-target-feature" "+reserve-x2"
 
-// RUN: %clang -target riscv32 -ffixed-x3 -### %s 2> %t
+// RUN: %clang --target=riscv32 -ffixed-x3 -### %s 2> %t
 // RUN: FileCheck --check-prefix=CHECK-FIXED-X3 < %t %s
-// RUN: %clang -target riscv64 -ffixed-x3 -### %s 2> %t
+// RUN: %clang --target=riscv64 -ffixed-x3 -### %s 2> %t
 // RUN: FileCheck --check-prefix=CHECK-FIXED-X3 < %t %s
 // CHECK-FIXED-X3: "-target-feature" "+reserve-x3"
 
-// RUN: %clang -target riscv32 -ffixed-x4 -### %s 2> %t
+// RUN: %clang --target=riscv32 -ffixed-x4 -### %s 2> %t
 // RUN: FileCheck --check-prefix=CHECK-FIXED-X4 < %t %s
-// RUN: %clang -target riscv64 -ffixed-x4 -### %s 2> %t
+// RUN: %clang --target=riscv64 -ffixed-x4 -### %s 2> %t
 // RUN: FileCheck --check-prefix=CHECK-FIXED-X4 < %t %s
 // CHECK-FIXED-X4: "-target-feature" "+reserve-x4"
 
-// RUN: %clang -target riscv32 -ffixed-x5 -### %s 2> %t
+// RUN: %clang --target=riscv32 -ffixed-x5 -### %s 2> %t
 // RUN: FileCheck --check-prefix=CHECK-FIXED-X5 < %t %s
-// RUN: %clang -target riscv64 -ffixed-x5 -### %s 2> %t
+// RUN: %clang --target=riscv64 -ffixed-x5 -### %s 2> %t
 // RUN: FileCheck --check-prefix=CHECK-FIXED-X5 < %t %s
 // CHECK-FIXED-X5: "-target-feature" "+reserve-x5"
 
-// RUN: %clang -target riscv32 -ffixed-x6 -### %s 2> %t
+// RUN: %clang --target=riscv32 -ffixed-x6 -### %s 2> %t
 // RUN: FileCheck --check-prefix=CHECK-FIXED-X6 < %t %s
-// RUN: %clang -target riscv64 -ffixed-x6 -### %s 2> %t
+// RUN: %clang --target=riscv64 -ffixed-x6 -### %s 2> %t
 // RUN: FileCheck --check-prefix=CHECK-FIXED-X6 < %t %s
 // CHECK-FIXED-X6: "-target-feature" "+reserve-x6"
 
-// RUN: %clang -target riscv32 -ffixed-x7 -### %s 2> %t
+// RUN: %clang --target=riscv32 -ffixed-x7 -### %s 2> %t
 // RUN: FileCheck --check-prefix=CHECK-FIXED-X7 < %t %s
-// RUN: %clang -target riscv64 -ffixed-x7 -### %s 2> %t
+// RUN: %clang --target=riscv64 -ffixed-x7 -### %s 2> %t
 // RUN: FileCheck --check-prefix=CHECK-FIXED-X7 < %t %s
 // CHECK-FIXED-X7: "-target-feature" "+reserve-x7"
 
-// RUN: %clang -target riscv32 -ffixed-x8 -### %s 2> %t
+// RUN: %clang --target=riscv32 -ffixed-x8 -### %s 2> %t
 // RUN: FileCheck --check-prefix=CHECK-FIXED-X8 < %t %s
-// RUN: %clang -target riscv64 -ffixed-x8 -### %s 2> %t
+// RUN: %clang --target=riscv64 -ffixed-x8 -### %s 2> %t
 // RUN: FileCheck --check-prefix=CHECK-FIXED-X8 < %t %s
 // CHECK-FIXED-X8: "-target-feature" "+reserve-x8"
 
-// RUN: %clang -target riscv32 -ffixed-x9 -### %s 2> %t
+// RUN: %clang --target=riscv32 -ffixed-x9 -### %s 2> %t
 // RUN: FileCheck --check-prefix=CHECK-FIXED-X9 < %t %s
-// RUN: %clang -target riscv64 -ffixed-x9 -### %s 2> %t
+// RUN: %clang --target=riscv64 -ffixed-x9 -### %s 2> %t
 // RUN: FileCheck --check-prefix=CHECK-FIXED-X9 < %t %s
 // CHECK-FIXED-X9: "-target-feature" "+reserve-x9"
 
-// RUN: %clang -target riscv32 -ffixed-x10 -### %s 2> %t
+// RUN: %clang --target=riscv32 -ffixed-x10 -### %s 2> %t
 // RUN: FileCheck --check-prefix=CHECK-FIXED-X10 < %t %s
-// RUN: %clang -target riscv64 -ffixed-x10 -### %s 2> %t
+// RUN: %clang --target=riscv64 -ffixed-x10 -### %s 2> %t
 // RUN: FileCheck --check-prefix=CHECK-FIXED-X10 < %t %s
 // CHECK-FIXED-X10: "-target-feature" "+reserve-x10"
 
-// RUN: %clang -target riscv32 -ffixed-x11 -### %s 2> %t
+// RUN: %clang --target=riscv32 -ffixed-x11 -### %s 2> %t
 // RUN: FileCheck --check-prefix=CHECK-FIXED-X11 < %t %s
-// RUN: %clang -target riscv64 -ffixed-x11 -### %s 2> %t
+// RUN: %clang --target=riscv64 -ffixed-x11 -### %s 2> %t
 // RUN: FileCheck --check-prefix=CHECK-FIXED-X11 < %t %s
 // CHECK-FIXED-X11: "-target-feature" "+reserve-x11"
 
-// RUN: %clang -target riscv32 -ffixed-x12 -### %s 2> %t
+// RUN: %clang --target=riscv32 -ffixed-x12 -### %s 2> %t
 // RUN: FileCheck --check-prefix=CHECK-FIXED-X12 < %t %s
-// RUN: %clang -target riscv64 -ffixed-x12 -### %s 2> %t
+// RUN: %clang --target=riscv64 -ffixed-x12 -### %s 2> %t
 // RUN: FileCheck --check-prefix=CHECK-FIXED-X12 < %t %s
 // CHECK-FIXED-X12: "-target-feature" "+reserve-x12"
 
-// RUN: %clang -target riscv32 -ffixed-x13 -### %s 2> %t
+// RUN: %clang --target=riscv32 -ffixed-x13 -### %s 2> %t
 // RUN: FileCheck --check-prefix=CHECK-FIXED-X13 < %t %s
-// RUN: %clang -target riscv64 -ffixed-x13 -### %s 2> %t
+// RUN: %clang --target=riscv64 -ffixed-x13 -### %s 2> %t
 // RUN: FileCheck --check-prefix=CHECK-FIXED-X13 < %t %s
 // CHECK-FIXED-X13: "-target-feature" "+reserve-x13"
 
-// RUN: %clang -target riscv32 -ffixed-x14 -### %s 2> %t
+// RUN: %clang --target=riscv32 -ffixed-x14 -### %s 2> %t
 // RUN: FileCheck --check-prefix=CHECK-FIXED-X14 < %t %s
-// RUN: %clang -target riscv64 -ffixed-x14 -### %s 2> %t
+// RUN: %clang --target=riscv64 -ffixed-x14 -### %s 2> %t
 // RUN: FileCheck --check-prefix=CHECK-FIXED-X14 < %t %s
 // CHECK-FIXED-X14: "-target-feature" "+reserve-x14"
 
-// RUN: %clang -target riscv32 -ffixed-x15 -### %s 2> %t
+// RUN: %clang --target=riscv32 -ffixed-x15 -### %s 2> %t
 // RUN: FileCheck --check-prefix=CHECK-FIXED-X15 < %t %s
-// RUN: %clang -target riscv64 -ffixed-x15 -### %s 2> %t
+// RUN: %clang --target=riscv64 -ffixed-x15 -### %s 2> %t
 // RUN: FileCheck --check-prefix=CHECK-FIXED-X15 < %t %s
 // CHECK-FIXED-X15: "-target-feature" "+reserve-x15"
 
-// RUN: %clang -target riscv32 -ffixed-x16 -### %s 2> %t
+// RUN: %clang --target=riscv32 -ffixed-x16 -### %s 2> %t
 // RUN: FileCheck --check-prefix=CHECK-FIXED-X16 < %t %s
-// RUN: %clang -target riscv64 -ffixed-x16 -### %s 2> %t
+// RUN: %clang --target=riscv64 -ffixed-x16 -### %s 2> %t
 // RUN: FileCheck --check-prefix=CHECK-FIXED-X16 < %t %s
 // CHECK-FIXED-X16: "-target-feature" "+reserve-x16"
 
-// RUN: %clang -target riscv32 -ffixed-x17 -### %s 2> %t
+// RUN: %clang --target=riscv32 -ffixed-x17 -### %s 2> %t
 // RUN: FileCheck --check-prefix=CHECK-FIXED-X17 < %t %s
-// RUN: %clang -target riscv64 -ffixed-x17 -### %s 2> %t
+// RUN: %clang --target=riscv64 -ffixed-x17 -### %s 2> %t
 // RUN: FileCheck --check-prefix=CHECK-FIXED-X17 < %t %s
 // CHECK-FIXED-X17: "-target-feature" "+reserve-x17"
 
-// RUN: %clang -target riscv32 -ffixed-x18 -### %s 2> %t
+// RUN: %clang --target=riscv32 -ffixed-x18 -### %s 2> %t
 // RUN: FileCheck --check-prefix=CHECK-FIXED-X18 < %t %s
-// RUN: %clang -target riscv64 -ffixed-x18 -### %s 2> %t
+// RUN: %clang --target=riscv64 -ffixed-x18 -### %s 2> %t
 // RUN: FileCheck --check-prefix=CHECK-FIXED-X18 < %t %s
 // CHECK-FIXED-X18: "-target-feature" "+reserve-x18"
 
-// RUN: %clang -target riscv32 -ffixed-x19 -### %s 2> %t
+// RUN: %clang --target=riscv32 -ffixed-x19 -### %s 2> %t
 // RUN: FileCheck --check-prefix=CHECK-FIXED-X19 < %t %s
-// RUN: %clang -target riscv64 -ffixed-x19 -### %s 2> %t
+// RUN: %clang --target=riscv64 -ffixed-x19 -### %s 2> %t
 // RUN: FileCheck --check-prefix=CHECK-FIXED-X19 < %t %s
 // CHECK-FIXED-X19: "-target-feature" "+reserve-x19"
 
-// RUN: %clang -target riscv32 -ffixed-x20 -### %s 2> %t
+// RUN: %clang --target=riscv32 -ffixed-x20 -### %s 2> %t
 // RUN: FileCheck --check-prefix=CHECK-FIXED-X20 < %t %s
-// RUN: %clang -target riscv64 -ffixed-x20 -### %s 2> %t
+// RUN: %clang --target=riscv64 -ffixed-x20 -### %s 2> %t
 // RUN: FileCheck --check-prefix=CHECK-FIXED-X20 < %t %s
 // CHECK-FIXED-X20: "-target-feature" "+reserve-x20"
 
-// RUN: %clang -target riscv32 -ffixed-x21 -### %s 2> %t
+// RUN: %clang --target=riscv32 -ffixed-x21 -### %s 2> %t
 // RUN: FileCheck --check-prefix=CHECK-FIXED-X21 < %t %s
-// RUN: %clang -target riscv64 -ffixed-x21 -### %s 2> %t
+// RUN: %clang --target=riscv64 -ffixed-x21 -### %s 2> %t
 // RUN: FileCheck --check-prefix=CHECK-FIXED-X21 < %t %s
 // CHECK-FIXED-X21: "-target-feature" "+reserve-x21"
 
-// RUN: %clang -target riscv32 -ffixed-x22 -### %s 2> %t
+// RUN: %clang --target=riscv32 -ffixed-x22 -### %s 2> %t
 // RUN: FileCheck --check-prefix=CHECK-FIXED-X22 < %t %s
-// RUN: %clang -target riscv64 -ffixed-x22 -### %s 2> %t
+// RUN: %clang --target=riscv64 -ffixed-x22 -### %s 2> %t
 // RUN: FileCheck --check-prefix=CHECK-FIXED-X22 < %t %s
 // CHECK-FIXED-X22: "-target-feature" "+reserve-x22"
 
-// RUN: %clang -target riscv32 -ffixed-x23 -### %s 2> %t
+// RUN: %clang --target=riscv32 -ffixed-x23 -### %s 2> %t
 // RUN: FileCheck --check-prefix=CHECK-FIXED-X23 < %t %s
-// RUN: %clang -target riscv64 -ffixed-x23 -### %s 2> %t
+// RUN: %clang --target=riscv64 -ffixed-x23 -### %s 2> %t
 // RUN: FileCheck --check-prefix=CHECK-FIXED-X23 < %t %s
 // CHECK-FIXED-X23: "-target-feature" "+reserve-x23"
 
-// RUN: %clang -target riscv32 -ffixed-x24 -### %s 2> %t
+// RUN: %clang --target=riscv32 -ffixed-x24 -### %s 2> %t
 // RUN: FileCheck --check-prefix=CHECK-FIXED-X24 < %t %s
-// RUN: %clang -target riscv64 -ffixed-x24 -### %s 2> %t
+// RUN: %clang --target=riscv64 -ffixed-x24 -### %s 2> %t
 // RUN: FileCheck --check-prefix=CHECK-FIXED-X24 < %t %s
 // CHECK-FIXED-X24: "-target-feature" "+reserve-x24"
 
-// RUN: %clang -target riscv32 -ffixed-x25 -### %s 2> %t
+// RUN: %clang --target=riscv32 -ffixed-x25 -### %s 2> %t
 // RUN: FileCheck --check-prefix=CHECK-FIXED-X25 < %t %s
-// RUN: %clang -target riscv64 -ffixed-x25 -### %s 2> %t
+// RUN: %clang --target=riscv64 -ffixed-x25 -### %s 2> %t
 // RUN: FileCheck --check-prefix=CHECK-FIXED-X25 < %t %s
 // CHECK-FIXED-X25: "-target-feature" "+reserve-x25"
 
-// RUN: %clang -target riscv32 -ffixed-x26 -### %s 2> %t
+// RUN: %clang --target=riscv32 -ffixed-x26 -### %s 2> %t
 // RUN: FileCheck --check-prefix=CHECK-FIXED-X26 < %t %s
-// RUN: %clang -target riscv64 -ffixed-x26 -### %s 2> %t
+// RUN: %clang --target=riscv64 -ffixed-x26 -### %s 2> %t
 // RUN: FileCheck --check-prefix=CHECK-FIXED-X26 < %t %s
 // CHECK-FIXED-X26: "-target-feature" "+reserve-x26"
 
-// RUN: %clang -target riscv32 -ffixed-x27 -### %s 2> %t
+// RUN: %clang --target=riscv32 -ffixed-x27 -### %s 2> %t
 // RUN: FileCheck --check-prefix=CHECK-FIXED-X27 < %t %s
-// RUN: %clang -target riscv64 -ffixed-x27 -### %s 2> %t
+// RUN: %clang --target=riscv64 -ffixed-x27 -### %s 2> %t
 // RUN: FileCheck --check-prefix=CHECK-FIXED-X27 < %t %s
 // CHECK-FIXED-X27: "-target-feature" "+reserve-x27"
 
-// RUN: %clang -target riscv32 -ffixed-x28 -### %s 2> %t
+// RUN: %clang --target=riscv32 -ffixed-x28 -### %s 2> %t
 // RUN: FileCheck --check-prefix=CHECK-FIXED-X28 < %t %s
-// RUN: %clang -target riscv64 -ffixed-x28 -### %s 2> %t
+// RUN: %clang --target=riscv64 -ffixed-x28 -### %s 2> %t
 // RUN: FileCheck --check-prefix=CHECK-FIXED-X28 < %t %s
 // CHECK-FIXED-X28: "-target-feature" "+reserve-x28"
 
-// RUN: %clang -target riscv32 -ffixed-x29 -### %s 2> %t
+// RUN: %clang --target=riscv32 -ffixed-x29 -### %s 2> %t
 // RUN: FileCheck --check-prefix=CHECK-FIXED-X29 < %t %s
-// RUN: %clang -target riscv64 -ffixed-x29 -### %s 2> %t
+// RUN: %clang --target=riscv64 -ffixed-x29 -### %s 2> %t
 // RUN: FileCheck --check-prefix=CHECK-FIXED-X29 < %t %s
 // CHECK-FIXED-X29: "-target-feature" "+reserve-x29"
 
-// RUN: %clang -target riscv32 -ffixed-x30 -### %s 2> %t
+// RUN: %clang --target=riscv32 -ffixed-x30 -### %s 2> %t
 // RUN: FileCheck --check-prefix=CHECK-FIXED-X30 < %t %s
-// RUN: %clang -target riscv64 -ffixed-x30 -### %s 2> %t
+// RUN: %clang --target=riscv64 -ffixed-x30 -### %s 2> %t
 // RUN: FileCheck --check-prefix=CHECK-FIXED-X30 < %t %s
 // CHECK-FIXED-X30: "-target-feature" "+reserve-x30"
 
-// RUN: %clang -target riscv32 -ffixed-x31 -### %s 2> %t
+// RUN: %clang --target=riscv32 -ffixed-x31 -### %s 2> %t
 // RUN: FileCheck --check-prefix=CHECK-FIXED-X31 < %t %s
-// RUN: %clang -target riscv64 -ffixed-x31 -### %s 2> %t
+// RUN: %clang --target=riscv64 -ffixed-x31 -### %s 2> %t
 // RUN: FileCheck --check-prefix=CHECK-FIXED-X31 < %t %s
 // CHECK-FIXED-X31: "-target-feature" "+reserve-x31"
 
 // Test multiple of reserve-x# options together.
-// RUN: %clang -target riscv32 \
+// RUN: %clang --target=riscv32 \
 // RUN: -ffixed-x1 \
 // RUN: -ffixed-x2 \
 // RUN: -ffixed-x18 \
@@ -195,7 +195,7 @@
 // RUN: --check-prefix=CHECK-FIXED-X2 \
 // RUN: --check-prefix=CHECK-FIXED-X18 \
 // RUN: < %t %s
-// RUN: %clang -target riscv64 \
+// RUN: %clang --target=riscv64 \
 // RUN: -ffixed-x1 \
 // RUN: -ffixed-x2 \
 // RUN: -ffixed-x18 \
@@ -207,7 +207,7 @@
 // RUN: < %t %s
 
 // Test all reserve-x# options together.
-// RUN: %clang -target riscv32 \
+// RUN: %clang --target=riscv32 \
 // RUN: -ffixed-x1 \
 // RUN: -ffixed-x2 \
 // RUN: -ffixed-x3 \
@@ -273,7 +273,7 @@
 // RUN: --check-prefix=CHECK-FIXED-X30 \
 // RUN: --check-prefix=CHECK-FIXED-X31 \
 // RUN: < %t %s
-// RUN: %clang -target riscv64 \
+// RUN: %clang --target=riscv64 \
 // RUN: -ffixed-x1 \
 // RUN: -ffixed-x2 \
 // RUN: -ffixed-x3 \

diff  --git a/clang/test/Driver/riscv-gnutools.c b/clang/test/Driver/riscv-gnutools.c
index 5aad7079fa43f..2b44494336d59 100644
--- a/clang/test/Driver/riscv-gnutools.c
+++ b/clang/test/Driver/riscv-gnutools.c
@@ -5,15 +5,15 @@
 // 32-bit checks
 
 // Check default on riscv32-unknown-elf
-// RUN: %clang -target riscv32-unknown-elf --gcc-toolchain=%S/Inputs/basic_riscv32_tree -fno-integrated-as %s -### -c \
+// RUN: %clang --target=riscv32-unknown-elf --gcc-toolchain=%S/Inputs/basic_riscv32_tree -fno-integrated-as %s -### -c \
 // RUN: 2>&1 | FileCheck -check-prefix=CHECK-RV32IMAC-ILP32 %s
 
 // Check default on riscv32-unknown-linux-gnu
-// RUN: %clang -target riscv32-unknown-linux-gnu --gcc-toolchain=%S/Inputs/basic_riscv32_tree -fno-integrated-as %s -### -c \
+// RUN: %clang --target=riscv32-unknown-linux-gnu --gcc-toolchain=%S/Inputs/basic_riscv32_tree -fno-integrated-as %s -### -c \
 // RUN: 2>&1 | FileCheck -check-prefix=CHECK-RV32IMAFDC-ILP32D %s
 
 // Check default when -march=rv32g specified
-// RUN: %clang -target riscv32 --gcc-toolchain=%S/Inputs/basic_riscv32_tree -fno-integrated-as %s -### -c -march=rv32g \
+// RUN: %clang --target=riscv32-unknown-elf --gcc-toolchain=%S/Inputs/basic_riscv32_tree -fno-integrated-as %s -### -c -march=rv32g \
 // RUN: 2>&1 | FileCheck -check-prefix=CHECK-RV32G-ILP32D %s
 
 // CHECK-RV32IMAC-ILP32: "{{.*}}as{{(.exe)?}}" "-mabi" "ilp32" "-march" "rv32imac"
@@ -24,15 +24,15 @@
 // 64-bit checks
 
 // Check default on riscv64-unknown-elf
-// RUN: %clang -target riscv64-unknown-elf --gcc-toolchain=%S/Inputs/basic_riscv64_tree -fno-integrated-as %s -### -c \
+// RUN: %clang --target=riscv64-unknown-elf --gcc-toolchain=%S/Inputs/basic_riscv64_tree -fno-integrated-as %s -### -c \
 // RUN: 2>&1 | FileCheck -check-prefix=CHECK-RV64IMAC-LP64 %s
 
 // Check default on riscv64-unknown-linux-gnu
-// RUN: %clang -target riscv64-unknown-linux-gnu --gcc-toolchain=%S/Inputs/basic_riscv64_tree -fno-integrated-as %s -### -c \
+// RUN: %clang --target=riscv64-unknown-linux-gnu --gcc-toolchain=%S/Inputs/basic_riscv64_tree -fno-integrated-as %s -### -c \
 // RUN: 2>&1 | FileCheck -check-prefix=CHECK-RV64IMAFDC-LP64D %s
 
 // Check default when -march=rv64g specified
-// RUN: %clang -target riscv64 --gcc-toolchain=%S/Inputs/basic_riscv64_tree -fno-integrated-as %s -### -c -march=rv64g \
+// RUN: %clang --target=riscv64-unknown-elf --gcc-toolchain=%S/Inputs/basic_riscv64_tree -fno-integrated-as %s -### -c -march=rv64g \
 // RUN: 2>&1 | FileCheck -check-prefix=CHECK-RV64G-LP64D %s
 
 // CHECK-RV64IMAC-LP64: "{{.*}}as{{(.exe)?}}" "-mabi" "lp64" "-march" "rv64imac"

diff  --git a/clang/test/Driver/riscv-sdata-warning.c b/clang/test/Driver/riscv-sdata-warning.c
index 7f1eeec6e99f5..387bd8b200a88 100644
--- a/clang/test/Driver/riscv-sdata-warning.c
+++ b/clang/test/Driver/riscv-sdata-warning.c
@@ -1,8 +1,8 @@
 // REQUIRES: riscv-registered-target
-// RUN: %clang -S -target riscv32-unknown-elf -fpic -msmall-data-limit=8 %s 2>&1 \
+// RUN: %clang -S --target=riscv32-unknown-elf -fpic -msmall-data-limit=8 %s 2>&1 \
 // RUN:   | FileCheck -check-prefix=CHECK-PIC-SDATA %s
 // CHECK-PIC-SDATA: warning: ignoring '-msmall-data-limit=' with -mcmodel=large for -fpic or RV64
 
-// RUN: %clang -S -target riscv64-unknown-elf -mcmodel=large -msmall-data-limit=8 %s 2>&1 \
+// RUN: %clang -S --target=riscv64-unknown-elf -mcmodel=large -msmall-data-limit=8 %s 2>&1 \
 // RUN:   | FileCheck -check-prefix=CHECK-RV64-LARGE-SDATA %s
 // CHECK-RV64-LARGE-SDATA: warning: ignoring '-msmall-data-limit=' with -mcmodel=large for -fpic or RV64

diff  --git a/clang/test/Driver/riscv32-toolchain-extra.c b/clang/test/Driver/riscv32-toolchain-extra.c
index 5df09029fc6f1..2d38aa3b545fe 100644
--- a/clang/test/Driver/riscv32-toolchain-extra.c
+++ b/clang/test/Driver/riscv32-toolchain-extra.c
@@ -18,12 +18,12 @@
 // RUN: ln -s %S/Inputs/basic_riscv32_nogcc_tree/riscv32-unknown-elf %t/riscv32-nogcc/riscv32-unknown-elf
 // RUN: %t/riscv32-nogcc/bin/clang %s -### -no-canonical-prefixes \
 // RUN:    --gcc-toolchain=%t/riscv32-nogcc/invalid \
-// RUN:    -target riscv32-unknown-elf --rtlib=platform -fuse-ld= 2>&1 \
+// RUN:    --target=riscv32-unknown-elf --rtlib=platform -fuse-ld= 2>&1 \
 // RUN:    | FileCheck -check-prefix=C-RV32-BAREMETAL-ILP32-NOGCC %s
 
 // RUN: %t/riscv32-nogcc/bin/clang %s -### -no-canonical-prefixes \
 // RUN:    --sysroot=%t/riscv32-nogcc/bin/../riscv32-unknown-elf \
-// RUN:    -target riscv32-unknown-elf --rtlib=platform -fuse-ld= 2>&1 \
+// RUN:    --target=riscv32-unknown-elf --rtlib=platform -fuse-ld= 2>&1 \
 // RUN:    | FileCheck -check-prefix=C-RV32-BAREMETAL-ILP32-NOGCC %s
 
 // C-RV32-BAREMETAL-ILP32-NOGCC: "-internal-isystem" "{{.*}}/riscv32-nogcc/bin/../riscv32-unknown-elf/include"

diff  --git a/clang/test/Driver/riscv32-toolchain.c b/clang/test/Driver/riscv32-toolchain.c
index 5d65a2e0acd36..7ab07563661c9 100644
--- a/clang/test/Driver/riscv32-toolchain.c
+++ b/clang/test/Driver/riscv32-toolchain.c
@@ -1,12 +1,12 @@
 // A basic clang -cc1 command-line, and simple environment check.
 
-// RUN: %clang %s -### -no-canonical-prefixes -target riscv32 \
+// RUN: %clang %s -### --target=riscv32 \
 // RUN:   --gcc-toolchain=%S/Inputs/basic_riscv32_tree 2>&1 \
 // RUN:   | FileCheck -check-prefix=CC1 %s
 // CC1: clang{{.*}} "-cc1" "-triple" "riscv32"
 
 // Test interaction with -fuse-ld=lld, if lld is available.
-// RUN: %clang %s -### -no-canonical-prefixes -target riscv32 \
+// RUN: %clang %s -### --target=riscv32 \
 // RUN:   --gcc-toolchain=%S/Inputs/basic_riscv32_tree -fuse-ld=lld 2>&1 \
 // RUN:   | FileCheck -check-prefix=LLD %s
 // LLD: {{(error: invalid linker name in argument '-fuse-ld=lld')|(ld.lld)}}
@@ -14,8 +14,8 @@
 // In the below tests, --rtlib=platform is used so that the driver ignores
 // the configure-time CLANG_DEFAULT_RTLIB option when choosing the runtime lib
 
-// RUN: %clang %s -### -no-canonical-prefixes -fuse-ld= \
-// RUN:   -target riscv32-unknown-elf --rtlib=platform \
+// RUN: %clang %s -### -fuse-ld= \
+// RUN:   --target=riscv32-unknown-elf --rtlib=platform \
 // RUN:   --gcc-toolchain=%S/Inputs/basic_riscv32_tree \
 // RUN:   --sysroot=%S/Inputs/basic_riscv32_tree/riscv32-unknown-elf 2>&1 \
 // RUN:   | FileCheck -check-prefix=C-RV32-BAREMETAL-ILP32 %s
@@ -29,8 +29,8 @@
 // C-RV32-BAREMETAL-ILP32: "--start-group" "-lc" "-lgloss" "--end-group" "-lgcc"
 // C-RV32-BAREMETAL-ILP32: "{{.*}}/Inputs/basic_riscv32_tree/lib/gcc/riscv32-unknown-elf/8.0.1{{/|\\\\}}crtend.o"
 
-// RUN: %clang %s -### -no-canonical-prefixes -fuse-ld= \
-// RUN:   -target riscv32-unknown-elf --rtlib=platform \
+// RUN: %clang %s -### -fuse-ld= \
+// RUN:   --target=riscv32-unknown-elf --rtlib=platform \
 // RUN:   --sysroot= \
 // RUN:   --gcc-toolchain=%S/Inputs/basic_riscv32_tree 2>&1 \
 // RUN:   | FileCheck -check-prefix=C-RV32-BAREMETAL-NOSYSROOT-ILP32 %s
@@ -43,8 +43,8 @@
 // C-RV32-BAREMETAL-NOSYSROOT-ILP32: "--start-group" "-lc" "-lgloss" "--end-group" "-lgcc"
 // C-RV32-BAREMETAL-NOSYSROOT-ILP32: "{{.*}}/Inputs/basic_riscv32_tree/lib/gcc/riscv32-unknown-elf/8.0.1{{/|\\\\}}crtend.o"
 
-// RUN: %clangxx %s -### -no-canonical-prefixes -fuse-ld= \
-// RUN:   -target riscv32-unknown-elf -stdlib=libstdc++ --rtlib=platform \
+// RUN: %clangxx %s -### -fuse-ld= \
+// RUN:   --target=riscv32-unknown-elf -stdlib=libstdc++ --rtlib=platform \
 // RUN:   --gcc-toolchain=%S/Inputs/basic_riscv32_tree \
 // RUN:   --sysroot=%S/Inputs/basic_riscv32_tree/riscv32-unknown-elf 2>&1 \
 // RUN:   | FileCheck -check-prefix=CXX-RV32-BAREMETAL-ILP32 %s
@@ -59,8 +59,8 @@
 // CXX-RV32-BAREMETAL-ILP32: "-lstdc++" "--start-group" "-lc" "-lgloss" "--end-group" "-lgcc"
 // CXX-RV32-BAREMETAL-ILP32: "{{.*}}/Inputs/basic_riscv32_tree/lib/gcc/riscv32-unknown-elf/8.0.1{{/|\\\\}}crtend.o"
 
-// RUN: %clangxx %s -### -no-canonical-prefixes -fuse-ld= \
-// RUN:   -target riscv32-unknown-elf -stdlib=libstdc++ --rtlib=platform \
+// RUN: %clangxx %s -### -fuse-ld= \
+// RUN:   --target=riscv32-unknown-elf -stdlib=libstdc++ --rtlib=platform \
 // RUN:   --sysroot= \
 // RUN:   --gcc-toolchain=%S/Inputs/basic_riscv32_tree 2>&1 \
 // RUN:   | FileCheck -check-prefix=CXX-RV32-BAREMETAL-NOSYSROOT-ILP32 %s
@@ -74,8 +74,8 @@
 // CXX-RV32-BAREMETAL-NOSYSROOT-ILP32: "-lstdc++" "--start-group" "-lc" "-lgloss" "--end-group" "-lgcc"
 // CXX-RV32-BAREMETAL-NOSYSROOT-ILP32: "{{.*}}/Inputs/basic_riscv32_tree/lib/gcc/riscv32-unknown-elf/8.0.1{{/|\\\\}}crtend.o"
 
-// RUN: %clang %s -### -no-canonical-prefixes -fuse-ld=ld -no-pie \
-// RUN:   -target riscv32-unknown-linux-gnu --rtlib=platform -mabi=ilp32 \
+// RUN: %clang %s -### -fuse-ld=ld -no-pie \
+// RUN:   --target=riscv32-unknown-linux-gnu --rtlib=platform -mabi=ilp32 \
 // RUN:   --gcc-toolchain=%S/Inputs/multilib_riscv_linux_sdk \
 // RUN:   --sysroot=%S/Inputs/multilib_riscv_linux_sdk/sysroot 2>&1 \
 // RUN:   | FileCheck -check-prefix=C-RV32-LINUX-MULTI-ILP32 %s
@@ -89,8 +89,8 @@
 // C-RV32-LINUX-MULTI-ILP32: "-L{{.*}}/Inputs/multilib_riscv_linux_sdk/sysroot/lib32/ilp32"
 // C-RV32-LINUX-MULTI-ILP32: "-L{{.*}}/Inputs/multilib_riscv_linux_sdk/sysroot/usr/lib32/ilp32"
 
-// RUN: %clang %s -### -no-canonical-prefixes -fuse-ld=ld -no-pie \
-// RUN:   -target riscv32-unknown-linux-gnu --rtlib=platform -march=rv32imafd \
+// RUN: %clang %s -### -fuse-ld=ld -no-pie \
+// RUN:   --target=riscv32-unknown-linux-gnu --rtlib=platform -march=rv32imafd \
 // RUN:   --gcc-toolchain=%S/Inputs/multilib_riscv_linux_sdk \
 // RUN:   --sysroot=%S/Inputs/multilib_riscv_linux_sdk/sysroot 2>&1 \
 // RUN:   | FileCheck -check-prefix=C-RV32-LINUX-MULTI-ILP32D %s
@@ -104,8 +104,8 @@
 // C-RV32-LINUX-MULTI-ILP32D: "-L{{.*}}/Inputs/multilib_riscv_linux_sdk/sysroot/lib32/ilp32d"
 // C-RV32-LINUX-MULTI-ILP32D: "-L{{.*}}/Inputs/multilib_riscv_linux_sdk/sysroot/usr/lib32/ilp32d"
 
-// RUN: %clang %s -### -no-canonical-prefixes -fuse-ld=ld \
-// RUN:   -target riscv32-unknown-elf --rtlib=platform --sysroot= \
+// RUN: %clang %s -### -fuse-ld=ld \
+// RUN:   --target=riscv32-unknown-elf --rtlib=platform --sysroot= \
 // RUN:   --gcc-toolchain=%S/Inputs/multilib_riscv_elf_sdk 2>&1 \
 // RUN:   | FileCheck -check-prefix=C-RV32I-BAREMETAL-MULTI-ILP32 %s
 
@@ -118,8 +118,8 @@
 // C-RV32I-BAREMETAL-MULTI-ILP32: "--start-group" "-lc" "-lgloss" "--end-group" "-lgcc"
 // C-RV32I-BAREMETAL-MULTI-ILP32: "{{.*}}/Inputs/multilib_riscv_elf_sdk/lib/gcc/riscv64-unknown-elf/8.2.0/rv32imac/ilp32{{/|\\\\}}crtend.o"
 
-// RUN: %clang %s -### -no-canonical-prefixes -fuse-ld=ld \
-// RUN:   -target riscv32-unknown-elf --rtlib=platform --sysroot= \
+// RUN: %clang %s -### -fuse-ld=ld \
+// RUN:   --target=riscv32-unknown-elf --rtlib=platform --sysroot= \
 // RUN:   -march=rv32im -mabi=ilp32\
 // RUN:   --gcc-toolchain=%S/Inputs/multilib_riscv_elf_sdk 2>&1 \
 // RUN:   | FileCheck -check-prefix=C-RV32IM-BAREMETAL-MULTI-ILP32 %s
@@ -133,8 +133,8 @@
 // C-RV32IM-BAREMETAL-MULTI-ILP32: "--start-group" "-lc" "-lgloss" "--end-group" "-lgcc"
 // C-RV32IM-BAREMETAL-MULTI-ILP32: "{{.*}}/Inputs/multilib_riscv_elf_sdk/lib/gcc/riscv64-unknown-elf/8.2.0/rv32im/ilp32{{/|\\\\}}crtend.o"
 
-// RUN: %clang %s -### -no-canonical-prefixes -fuse-ld=ld \
-// RUN:   -target riscv32-unknown-elf --rtlib=platform --sysroot= \
+// RUN: %clang %s -### -fuse-ld=ld \
+// RUN:   --target=riscv32-unknown-elf --rtlib=platform --sysroot= \
 // RUN:   -march=rv32iac -mabi=ilp32\
 // RUN:   --gcc-toolchain=%S/Inputs/multilib_riscv_elf_sdk 2>&1 \
 // RUN:   | FileCheck -check-prefix=C-RV32IAC-BAREMETAL-MULTI-ILP32 %s
@@ -148,8 +148,8 @@
 // C-RV32IAC-BAREMETAL-MULTI-ILP32: "--start-group" "-lc" "-lgloss" "--end-group" "-lgcc"
 // C-RV32IAC-BAREMETAL-MULTI-ILP32: "{{.*}}/Inputs/multilib_riscv_elf_sdk/lib/gcc/riscv64-unknown-elf/8.2.0/rv32iac/ilp32{{/|\\\\}}crtend.o"
 
-// RUN: %clang %s -### -no-canonical-prefixes -fuse-ld=ld \
-// RUN:   -target riscv32-unknown-elf --rtlib=platform --sysroot= \
+// RUN: %clang %s -### -fuse-ld=ld \
+// RUN:   --target=riscv32-unknown-elf --rtlib=platform --sysroot= \
 // RUN:   -march=rv32imac -mabi=ilp32\
 // RUN:   --gcc-toolchain=%S/Inputs/multilib_riscv_elf_sdk 2>&1 \
 // RUN:   | FileCheck -check-prefix=C-RV32IMAC-BAREMETAL-MULTI-ILP32 %s
@@ -163,8 +163,8 @@
 // C-RV32IMAC-BAREMETAL-MULTI-ILP32: "--start-group" "-lc" "-lgloss" "--end-group" "-lgcc"
 // C-RV32IMAC-BAREMETAL-MULTI-ILP32: "{{.*}}/Inputs/multilib_riscv_elf_sdk/lib/gcc/riscv64-unknown-elf/8.2.0/rv32imac/ilp32{{/|\\\\}}crtend.o"
 
-// RUN: %clang %s -### -no-canonical-prefixes -fuse-ld=ld \
-// RUN:   -target riscv32-unknown-elf --rtlib=platform --sysroot= \
+// RUN: %clang %s -### -fuse-ld=ld \
+// RUN:   --target=riscv32-unknown-elf --rtlib=platform --sysroot= \
 // RUN:   -march=rv32imafc -mabi=ilp32f \
 // RUN:   --gcc-toolchain=%S/Inputs/multilib_riscv_elf_sdk 2>&1 \
 // RUN:   | FileCheck -check-prefix=C-RV32IMAFC-BAREMETAL-MULTI-ILP32F %s
@@ -179,39 +179,39 @@
 // C-RV32IMAFC-BAREMETAL-MULTI-ILP32F: "{{.*}}/Inputs/multilib_riscv_elf_sdk/lib/gcc/riscv64-unknown-elf/8.2.0/rv32imafc/ilp32f{{/|\\\\}}crtend.o"
 
 // Check that --rtlib can be used to override the used runtime library
-// RUN: %clang %s -### -no-canonical-prefixes \
+// RUN: %clang %s -### \
 // RUN:   --gcc-toolchain=%S/Inputs/multilib_riscv_elf_sdk \
-// RUN:   -target riscv32-unknown-elf --rtlib=libgcc 2>&1 \
+// RUN:   --target=riscv32-unknown-elf --rtlib=libgcc 2>&1 \
 // RUN:   | FileCheck -check-prefix=C-RV32-RTLIB-LIBGCC-ILP32 %s
 // C-RV32-RTLIB-LIBGCC-ILP32: "{{.*}}crt0.o"
 // C-RV32-RTLIB-LIBGCC-ILP32: "{{.*}}crtbegin.o"
 // C-RV32-RTLIB-LIBGCC-ILP32: "--start-group" "-lc" "-lgloss" "--end-group" "-lgcc"
 // C-RV32-RTLIB-LIBGCC-ILP32: "{{.*}}crtend.o"
 
-// RUN: %clang %s -### -no-canonical-prefixes \
+// RUN: %clang %s -### \
 // RUN:   --gcc-toolchain=%S/Inputs/multilib_riscv_elf_sdk \
-// RUN:   -target riscv32-unknown-elf --rtlib=compiler-rt 2>&1 \
+// RUN:   --target=riscv32-unknown-elf --rtlib=compiler-rt 2>&1 \
 // RUN:   | FileCheck -check-prefix=C-RV32-RTLIB-COMPILERRT-ILP32 %s
 // C-RV32-RTLIB-COMPILERRT-ILP32: "{{.*}}crt0.o"
 // C-RV32-RTLIB-COMPILERRT-ILP32: "{{.*}}clang_rt.crtbegin-riscv32.o"
 // C-RV32-RTLIB-COMPILERRT-ILP32: "--start-group" "-lc" "-lgloss" "--end-group" "{{.*}}libclang_rt.builtins-riscv32.a"
 // C-RV32-RTLIB-COMPILERRT-ILP32: "{{.*}}clang_rt.crtend-riscv32.o"
 
-// RUN: %clang %s -### -no-canonical-prefixes -target riscv32 \
+// RUN: %clang %s -### --target=riscv32 \
 // RUN:   --gcc-toolchain=%S/Inputs/basic_riscv32_tree --sysroot= \
 // RUN:   -resource-dir=%s/Inputs/resource_dir 2>&1 \
 // RUN:   | FileCheck -check-prefix=RESOURCE-INC %s
 // RESOURCE-INC: "-internal-isystem" "{{.*}}/Inputs/resource_dir{{/|\\\\}}include"
 // RESOURCE-INC: "-internal-isystem" "{{.*}}/basic_riscv32_tree{{.*}}riscv32-unknown-elf{{/|\\\\}}include"
 
-// RUN: %clang %s -### -no-canonical-prefixes -target riscv32 \
+// RUN: %clang %s -### --target=riscv32 \
 // RUN:   --gcc-toolchain=%S/Inputs/basic_riscv32_tree --sysroot= \
 // RUN:   -resource-dir=%s/Inputs/resource_dir -nobuiltininc 2>&1 \
 // RUN:   | FileCheck -check-prefix=NO-RESOURCE-INC %s
 // NO-RESOURCE-INC-NOT: "-internal-isystem" "{{.*}}/Inputs/resource_dir{{/|\\\\}}include"
 // NO-RESOURCE-INC: "-internal-isystem" "{{.*}}/basic_riscv32_tree/{{.*}}riscv32-unknown-elf{{/|\\\\}}include"
 
-// RUN: %clang -target riscv32 %s -emit-llvm -S -o - | FileCheck %s
+// RUN: %clang --target=riscv32 %s -emit-llvm -S -o - | FileCheck %s
 
 typedef __builtin_va_list va_list;
 typedef __SIZE_TYPE__ size_t;

diff  --git a/clang/test/Driver/riscv64-toolchain-extra.c b/clang/test/Driver/riscv64-toolchain-extra.c
index e6cae72ed2a21..a6ec9b16cc5ca 100644
--- a/clang/test/Driver/riscv64-toolchain-extra.c
+++ b/clang/test/Driver/riscv64-toolchain-extra.c
@@ -18,12 +18,12 @@
 // RUN: ln -s %S/Inputs/basic_riscv64_nogcc_tree/riscv64-unknown-elf %t/riscv64-nogcc/riscv64-unknown-elf
 // RUN: %t/riscv64-nogcc/bin/clang %s -### -no-canonical-prefixes \
 // RUN:    --gcc-toolchain=%t/riscv64-nogcc/invalid \
-// RUN:    -target riscv64-unknown-elf --rtlib=platform -fuse-ld= 2>&1 \
+// RUN:    --target=riscv64-unknown-elf --rtlib=platform -fuse-ld= 2>&1 \
 // RUN:    | FileCheck -check-prefix=C-RV64-BAREMETAL-LP64-NOGCC %s
 
 // RUN: %t/riscv64-nogcc/bin/clang %s -### -no-canonical-prefixes \
 // RUN:    --sysroot=%t/riscv64-nogcc/bin/../riscv64-unknown-elf \
-// RUN:    -target riscv64-unknown-elf --rtlib=platform -fuse-ld= 2>&1 \
+// RUN:    --target=riscv64-unknown-elf --rtlib=platform -fuse-ld= 2>&1 \
 // RUN:    | FileCheck -check-prefix=C-RV64-BAREMETAL-LP64-NOGCC %s
 
 // C-RV64-BAREMETAL-LP64-NOGCC: "-internal-isystem" "{{.*}}/riscv64-nogcc/bin/../riscv64-unknown-elf/include"

diff  --git a/clang/test/Driver/riscv64-toolchain.c b/clang/test/Driver/riscv64-toolchain.c
index deb8d077ea9e7..371dcfda4311a 100644
--- a/clang/test/Driver/riscv64-toolchain.c
+++ b/clang/test/Driver/riscv64-toolchain.c
@@ -1,12 +1,12 @@
 // A basic clang -cc1 command-line, and simple environment check.
 
-// RUN: %clang %s -### -no-canonical-prefixes -target riscv64 \
+// RUN: %clang %s -### --target=riscv64 \
 // RUN:   --gcc-toolchain=%S/Inputs/basic_riscv64_tree 2>&1 \
 // RUN:   | FileCheck -check-prefix=CC1 %s
 // CC1: clang{{.*}} "-cc1" "-triple" "riscv64"
 
 // Test interaction with -fuse-ld=lld, if lld is available.
-// RUN: %clang %s -### -no-canonical-prefixes -target riscv32 -fuse-ld=lld \
+// RUN: %clang %s -### --target=riscv32 -fuse-ld=lld \
 // RUN:   --gcc-toolchain=%S/Inputs/basic_riscv64_tree 2>&1 \
 // RUN:   | FileCheck -check-prefix=LLD %s
 // LLD: {{(error: invalid linker name in argument '-fuse-ld=lld')|(ld.lld)}}
@@ -14,8 +14,8 @@
 // In the below tests, --rtlib=platform is used so that the driver ignores
 // the configure-time CLANG_DEFAULT_RTLIB option when choosing the runtime lib
 
-// RUN: %clang %s -### -no-canonical-prefixes -fuse-ld= \
-// RUN:   -target riscv64-unknown-elf --rtlib=platform \
+// RUN: %clang %s -### -fuse-ld= \
+// RUN:   --target=riscv64-unknown-elf --rtlib=platform \
 // RUN:   --gcc-toolchain=%S/Inputs/basic_riscv64_tree \
 // RUN:   --sysroot=%S/Inputs/basic_riscv64_tree/riscv64-unknown-elf 2>&1 -no-pie \
 // RUN:   | FileCheck -check-prefix=C-RV64-BAREMETAL-LP64 %s
@@ -29,8 +29,8 @@
 // C-RV64-BAREMETAL-LP64: "--start-group" "-lc" "-lgloss" "--end-group" "-lgcc"
 // C-RV64-BAREMETAL-LP64: "{{.*}}/Inputs/basic_riscv64_tree/lib/gcc/riscv64-unknown-elf/8.0.1{{/|\\\\}}crtend.o"
 
-// RUN: %clang %s -### -no-canonical-prefixes -fuse-ld= \
-// RUN:   -target riscv64-unknown-elf --rtlib=platform \
+// RUN: %clang %s -### -fuse-ld= \
+// RUN:   --target=riscv64-unknown-elf --rtlib=platform \
 // RUN:   --sysroot= \
 // RUN:   --gcc-toolchain=%S/Inputs/basic_riscv64_tree 2>&1 \
 // RUN:   | FileCheck -check-prefix=C-RV64-BAREMETAL-NOSYSROOT-LP64 %s
@@ -43,8 +43,8 @@
 // C-RV64-BAREMETAL-NOSYSROOT-LP64: "--start-group" "-lc" "-lgloss" "--end-group" "-lgcc"
 // C-RV64-BAREMETAL-NOSYSROOT-LP64: "{{.*}}/Inputs/basic_riscv64_tree/lib/gcc/riscv64-unknown-elf/8.0.1{{/|\\\\}}crtend.o"
 
-// RUN: %clangxx %s -### -no-canonical-prefixes -fuse-ld= \
-// RUN:   -target riscv64-unknown-elf -stdlib=libstdc++ --rtlib=platform \
+// RUN: %clangxx %s -### -fuse-ld= \
+// RUN:   --target=riscv64-unknown-elf -stdlib=libstdc++ --rtlib=platform \
 // RUN:   --gcc-toolchain=%S/Inputs/basic_riscv64_tree \
 // RUN:   --sysroot=%S/Inputs/basic_riscv64_tree/riscv64-unknown-elf 2>&1 \
 // RUN:   | FileCheck -check-prefix=CXX-RV64-BAREMETAL-LP64 %s
@@ -59,8 +59,8 @@
 // CXX-RV64-BAREMETAL-LP64: "-lstdc++" "--start-group" "-lc" "-lgloss" "--end-group" "-lgcc"
 // CXX-RV64-BAREMETAL-LP64: "{{.*}}/Inputs/basic_riscv64_tree/lib/gcc/riscv64-unknown-elf/8.0.1{{/|\\\\}}crtend.o"
 
-// RUN: %clangxx %s -### -no-canonical-prefixes -fuse-ld= \
-// RUN:   -target riscv64-unknown-elf -stdlib=libstdc++ --rtlib=platform \
+// RUN: %clangxx %s -### -fuse-ld= \
+// RUN:   --target=riscv64-unknown-elf -stdlib=libstdc++ --rtlib=platform \
 // RUN:   --sysroot= \
 // RUN:   --gcc-toolchain=%S/Inputs/basic_riscv64_tree 2>&1 \
 // RUN:   | FileCheck -check-prefix=CXX-RV64-BAREMETAL-NOSYSROOT-LP64 %s
@@ -74,8 +74,8 @@
 // CXX-RV64-BAREMETAL-NOSYSROOT-LP64: "-lstdc++" "--start-group" "-lc" "-lgloss" "--end-group" "-lgcc"
 // CXX-RV64-BAREMETAL-NOSYSROOT-LP64: "{{.*}}/Inputs/basic_riscv64_tree/lib/gcc/riscv64-unknown-elf/8.0.1{{/|\\\\}}crtend.o"
 
-// RUN: %clang %s -### -no-canonical-prefixes -fuse-ld= -no-pie \
-// RUN:   -target riscv64-unknown-linux-gnu --rtlib=platform -mabi=lp64 \
+// RUN: %clang %s -### -fuse-ld= -no-pie \
+// RUN:   --target=riscv64-unknown-linux-gnu --rtlib=platform -mabi=lp64 \
 // RUN:   --gcc-toolchain=%S/Inputs/multilib_riscv_linux_sdk \
 // RUN:   --sysroot=%S/Inputs/multilib_riscv_linux_sdk/sysroot 2>&1 \
 // RUN:   | FileCheck -check-prefix=C-RV64-LINUX-MULTI-LP64 %s
@@ -89,8 +89,8 @@
 // C-RV64-LINUX-MULTI-LP64: "-L{{.*}}/Inputs/multilib_riscv_linux_sdk/sysroot/lib64/lp64"
 // C-RV64-LINUX-MULTI-LP64: "-L{{.*}}/Inputs/multilib_riscv_linux_sdk/sysroot/usr/lib64/lp64"
 
-// RUN: %clang %s -### -no-canonical-prefixes -fuse-ld=ld -no-pie \
-// RUN:   -target riscv64-unknown-linux-gnu --rtlib=platform -march=rv64imafd \
+// RUN: %clang %s -### -fuse-ld=ld -no-pie \
+// RUN:   --target=riscv64-unknown-linux-gnu --rtlib=platform -march=rv64imafd \
 // RUN:   --gcc-toolchain=%S/Inputs/multilib_riscv_linux_sdk \
 // RUN:   --sysroot=%S/Inputs/multilib_riscv_linux_sdk/sysroot 2>&1 \
 // RUN:   | FileCheck -check-prefix=C-RV64-LINUX-MULTI-LP64D %s
@@ -104,8 +104,8 @@
 // C-RV64-LINUX-MULTI-LP64D: "-L{{.*}}/Inputs/multilib_riscv_linux_sdk/sysroot/lib64/lp64d"
 // C-RV64-LINUX-MULTI-LP64D: "-L{{.*}}/Inputs/multilib_riscv_linux_sdk/sysroot/usr/lib64/lp64d"
 
-// RUN: %clang %s -### -no-canonical-prefixes -fuse-ld=ld \
-// RUN:   -target riscv64-unknown-elf --rtlib=platform --sysroot= \
+// RUN: %clang %s -### -fuse-ld=ld \
+// RUN:   --target=riscv64-unknown-elf --rtlib=platform --sysroot= \
 // RUN:   -march=rv64imac -mabi=lp64\
 // RUN:   --gcc-toolchain=%S/Inputs/multilib_riscv_elf_sdk 2>&1 \
 // RUN:   | FileCheck -check-prefix=C-RV64IMAC-BAREMETAL-MULTI-LP64 %s
@@ -119,8 +119,8 @@
 // C-RV64IMAC-BAREMETAL-MULTI-LP64: "--start-group" "-lc" "-lgloss" "--end-group" "-lgcc"
 // C-RV64IMAC-BAREMETAL-MULTI-LP64: "{{.*}}/Inputs/multilib_riscv_elf_sdk/lib/gcc/riscv64-unknown-elf/8.2.0/rv64imac/lp64{{/|\\\\}}crtend.o"
 
-// RUN: %clang %s -### -no-canonical-prefixes -fuse-ld=ld \
-// RUN:   -target riscv64-unknown-elf --rtlib=platform --sysroot= \
+// RUN: %clang %s -### -fuse-ld=ld \
+// RUN:   --target=riscv64-unknown-elf --rtlib=platform --sysroot= \
 // RUN:   -march=rv64imafdc -mabi=lp64d \
 // RUN:   --gcc-toolchain=%S/Inputs/multilib_riscv_elf_sdk 2>&1 \
 // RUN:   | FileCheck -check-prefix=C-RV64IMAFDC-BAREMETAL-MULTI-ILP64D %s
@@ -135,39 +135,39 @@
 // C-RV64IMAFDC-BAREMETAL-MULTI-ILP64D: "{{.*}}/Inputs/multilib_riscv_elf_sdk/lib/gcc/riscv64-unknown-elf/8.2.0/rv64imafdc/lp64d{{/|\\\\}}crtend.o"
 
 // Check that --rtlib can be used to override the used runtime library
-// RUN: %clang %s -### -no-canonical-prefixes \
+// RUN: %clang %s -### \
 // RUN:   --gcc-toolchain=%S/Inputs/multilib_riscv_elf_sdk \
-// RUN:   -target riscv64-unknown-elf --rtlib=libgcc 2>&1 \
+// RUN:   --target=riscv64-unknown-elf --rtlib=libgcc 2>&1 \
 // RUN:   | FileCheck -check-prefix=C-RV64-RTLIB-LIBGCC-LP64 %s
 // C-RV64-RTLIB-LIBGCC-LP64: "{{.*}}crt0.o"
 // C-RV64-RTLIB-LIBGCC-LP64: "{{.*}}crtbegin.o"
 // C-RV64-RTLIB-LIBGCC-LP64: "--start-group" "-lc" "-lgloss" "--end-group" "-lgcc"
 // C-RV64-RTLIB-LIBGCC-LP64: "{{.*}}crtend.o"
 
-// RUN: %clang %s -### -no-canonical-prefixes \
+// RUN: %clang %s -### \
 // RUN:   --gcc-toolchain=%S/Inputs/multilib_riscv_elf_sdk \
-// RUN:   -target riscv64-unknown-elf --rtlib=compiler-rt 2>&1 \
+// RUN:   --target=riscv64-unknown-elf --rtlib=compiler-rt 2>&1 \
 // RUN:   | FileCheck -check-prefix=C-RV64-RTLIB-COMPILERRT-LP64 %s
 // C-RV64-RTLIB-COMPILERRT-LP64: "{{.*}}crt0.o"
 // C-RV64-RTLIB-COMPILERRT-LP64: "{{.*}}clang_rt.crtbegin-riscv64.o"
 // C-RV64-RTLIB-COMPILERRT-LP64: "--start-group" "-lc" "-lgloss" "--end-group" "{{.*}}libclang_rt.builtins-riscv64.a"
 // C-RV64-RTLIB-COMPILERRT-LP64: "{{.*}}clang_rt.crtend-riscv64.o"
 
-// RUN: %clang %s -### -no-canonical-prefixes -target riscv64 \
+// RUN: %clang %s -### --target=riscv64 \
 // RUN:   --gcc-toolchain=%S/Inputs/basic_riscv64_tree --sysroot= \
 // RUN:   -resource-dir=%s/Inputs/resource_dir 2>&1 \
 // RUN:   | FileCheck -check-prefix=RESOURCE-INC %s
 // RESOURCE-INC: "-internal-isystem" "{{.*}}/Inputs/resource_dir{{/|\\\\}}include"
 // RESOURCE-INC: "-internal-isystem" "{{.*}}/basic_riscv64_tree/{{.*}}riscv64-unknown-elf{{/|\\\\}}include"
 
-// RUN: %clang %s -### -no-canonical-prefixes -target riscv64 \
+// RUN: %clang %s -### --target=riscv64 \
 // RUN:   --gcc-toolchain=%S/Inputs/basic_riscv64_tree --sysroot= \
 // RUN:   -resource-dir=%s/Inputs/resource_dir -nobuiltininc 2>&1 \
 // RUN:   | FileCheck -check-prefix=NO-RESOURCE-INC %s
 // NO-RESOURCE-INC-NOT: "-internal-isystem" "{{.*}}Inputs/resource_dir{{/|\\\\}}include"
 // NO-RESOURCE-INC: "-internal-isystem" "{{.*}}/basic_riscv64_tree/{{.*}}riscv64-unknown-elf{{/|\\\\}}include"
 
-// RUN: %clang -target riscv64 %s -emit-llvm -S -o - | FileCheck %s
+// RUN: %clang --target=riscv64 %s -emit-llvm -S -o - | FileCheck %s
 
 typedef __builtin_va_list va_list;
 typedef __SIZE_TYPE__ size_t;


        


More information about the cfe-commits mailing list