// RUN: touch %t.o
//
-// RUN: %clang -target x86_64-unknown-linux -### %t.o -flto=thin \
+// RUN: %clang --target=x86_64-unknown-linux -### %t.o -flto=thin \
// RUN: -fprofile-use 2>&1 | FileCheck %s
// CHECK: -plugin-opt=cs-profile-path=default.profdata
// compilation.
//
//
-// XRUN: %clang -### -target x86_64-linux-gnu -c --cuda-gpu-arch=sm_20 \
+// XRUN: %clang -### --target=x86_64-linux-gnu -c --cuda-gpu-arch=sm_20 \
// XRUN: -fprofile-generate %s 2>&1 | \
// XRUN: FileCheck --check-prefixes=CHECK,PROF %s
//
-// RUN: %clang -### -target x86_64-linux-gnu -c --cuda-gpu-arch=sm_20 \
+// RUN: %clang -### --target=x86_64-linux-gnu -c --cuda-gpu-arch=sm_20 \
// RUN: -fprofile-instr-generate %s 2>&1 | \
// RUN: FileCheck --check-prefixes=CHECK,PROF %s
//
-// RUN: %clang -### -target x86_64-linux-gnu -c --cuda-gpu-arch=sm_20 \
+// RUN: %clang -### --target=x86_64-linux-gnu -c --cuda-gpu-arch=sm_20 \
// RUN: -coverage %s 2>&1 | \
// RUN: FileCheck --check-prefixes=CHECK,GCOV %s
//
-// RUN: %clang -### -target x86_64-linux-gnu -c --cuda-gpu-arch=sm_20 \
+// RUN: %clang -### --target=x86_64-linux-gnu -c --cuda-gpu-arch=sm_20 \
// RUN: -ftest-coverage %s 2>&1 | \
// RUN: FileCheck --check-prefixes=CHECK,GCOV %s
//
-// RUN: %clang -### -target x86_64-linux-gnu -c --cuda-gpu-arch=sm_20 \
+// RUN: %clang -### --target=x86_64-linux-gnu -c --cuda-gpu-arch=sm_20 \
// RUN: -fprofile-instr-generate -fcoverage-mapping %s 2>&1 | \
// RUN: FileCheck --check-prefixes=CHECK,PROF %s
//
// test doesn't require that.)
// Check that -object_lto_path is passed correctly to ld64
-// RUN: %clang -fuse-ld=lld -B%S/Inputs/lld -target x86_64-apple-darwin10 \
+// RUN: %clang -fuse-ld=lld -B%S/Inputs/lld --target=x86_64-apple-darwin10 \
// RUN: %s -flto=full -### 2>&1 \
// RUN: | FileCheck -check-prefix=FULL_LTO_OBJECT_PATH %s
// FULL_LTO_OBJECT_PATH: {{ld(.exe)?"}}
// FULL_LTO_OBJECT_PATH-SAME: "-object_path_lto"
// FULL_LTO_OBJECT_PATH-SAME: {{cc\-[a-zA-Z0-9_]+.o}}"
-// RUN: %clang -fuse-ld=lld -B%S/Inputs/lld -target x86_64-apple-darwin10 \
+// RUN: %clang -fuse-ld=lld -B%S/Inputs/lld --target=x86_64-apple-darwin10 \
// RUN: %s -flto=thin -### 2>&1 \
// RUN: | FileCheck -check-prefix=THIN_LTO_OBJECT_PATH %s
// THIN_LTO_OBJECT_PATH: {{ld(.exe)?"}}
// RUN: mkdir -p %t/bin
// RUN: mkdir -p %t/lib
// RUN: touch %t/lib/libLTO.dylib
-// RUN: %clang -fuse-ld= -target x86_64-apple-darwin10 -### %s \
+// RUN: %clang -fuse-ld= --target=x86_64-apple-darwin10 -### %s \
// RUN: -ccc-install-dir %t/bin -mlinker-version=133 2> %t.log
// RUN: FileCheck -check-prefix=LINK_LTOLIB_PATH %s -input-file %t.log
//
// Also pass -lto_library even if the file doesn't exist; if it's needed at
// link time, ld will complain instead.
-// RUN: %clang -fuse-ld= -target x86_64-apple-darwin10 -### %s \
+// RUN: %clang -fuse-ld= --target=x86_64-apple-darwin10 -### %s \
// RUN: -ccc-install-dir %S/dummytestdir -mlinker-version=133 2> %t.log
// RUN: FileCheck -check-prefix=LINK_LTOLIB_PATH %s -input-file %t.log
// Check that -object_lto_path is passed correctly to ld64
-// RUN: %clang -fuse-ld= -target x86_64-apple-darwin10 %s -flto=full \
+// RUN: %clang -fuse-ld= --target=x86_64-apple-darwin10 %s -flto=full \
// RUN: -mlinker-version=116 -### 2>&1 \
// RUN: | FileCheck -check-prefix=FULL_LTO_OBJECT_PATH %s
// FULL_LTO_OBJECT_PATH: {{ld(.exe)?"}}
// FULL_LTO_OBJECT_PATH-SAME: "-object_path_lto"
// FULL_LTO_OBJECT_PATH-SAME: {{cc\-[a-zA-Z0-9_]+.o}}"
-// RUN: %clang -fuse-ld= -target x86_64-apple-darwin10 %s -flto=thin \
+// RUN: %clang -fuse-ld= --target=x86_64-apple-darwin10 %s -flto=thin \
// RUN: -mlinker-version=116 -### 2>&1 \
// RUN: | FileCheck -check-prefix=THIN_LTO_OBJECT_PATH %s
// THIN_LTO_OBJECT_PATH: {{ld(.exe)?"}}
// Check that we pass through -fglobal-isel flags to libLTO.
-// RUN: %clang -target arm64-apple-darwin %s -flto -fglobal-isel -### 2>&1 | \
+// RUN: %clang --target=arm64-apple-darwin %s -flto -fglobal-isel -### 2>&1 | \
// RUN: FileCheck --check-prefix=GISEL %s
// GISEL: {{ld(.exe)?"}}
// GISEL: "-mllvm" "-global-isel"
// Check that we disable atexit()-based global destructor lowering when
// compiling/linking for kernel/kext/freestanding.
-// RUN: %clang -target arm64-apple-darwin %s -flto -fapple-kext -### 2>&1 | \
+// RUN: %clang --target=arm64-apple-darwin %s -flto -fapple-kext -### 2>&1 | \
// RUN: FileCheck --check-prefix=KEXT %s
// KEXT: {{ld(.exe)?"}}
// KEXT: "-mllvm" "-disable-atexit-based-global-dtor-lowering"
// RUN: touch %t.o
//
-// RUN: %clang -target x86_64-unknown-linux -### %t.o -flto 2>&1 \
+// RUN: %clang --target=x86_64-unknown-linux -### %t.o -flto 2>&1 \
// RUN: -Wl,-plugin-opt=foo -O3 \
// RUN: -fprofile-sample-use=%s \
// RUN: | FileCheck %s
// Confirm that -gsplit-dwarf=DIR is passed to linker
-// RUN: %clang -target x86_64-unknown-linux -### %s -flto=thin -gsplit-dwarf -o a.out 2> %t
+// RUN: %clang --target=x86_64-unknown-linux -### %s -flto=thin -gsplit-dwarf -o a.out 2> %t
// RUN: FileCheck -check-prefix=CHECK-LINK-DWO-DIR-DEFAULT < %t %s
//
// CHECK-LINK-DWO-DIR-DEFAULT: "-plugin-opt=dwo_dir=a.out_dwo"
// Confirm that -flto-jobs=N is passed to linker
-// RUN: %clang -target x86_64-unknown-linux -### %s -flto=thin -flto-jobs=5 2> %t
+// RUN: %clang --target=x86_64-unknown-linux -### %s -flto=thin -flto-jobs=5 2> %t
// RUN: FileCheck -check-prefix=CHECK-LINK-THIN-JOBS-ACTION < %t %s
//
-// RUN: %clang -target x86_64-sie-ps5 -### %s -flto=thin -flto-jobs=5 2> %t
+// RUN: %clang --target=x86_64-sie-ps5 -### %s -flto=thin -flto-jobs=5 2> %t
// RUN: FileCheck -check-prefix=CHECK-LINK-THIN-JOBS-ACTION < %t %s
//
// CHECK-LINK-THIN-JOBS-ACTION: "-plugin-opt=jobs=5"
//
-// RUN: %clang -target x86_64-scei-ps4 -### %s -flto=thin -flto-jobs=5 2> %t
+// RUN: %clang --target=x86_64-scei-ps4 -### %s -flto=thin -flto-jobs=5 2> %t
// RUN: FileCheck -check-prefix=CHECK-PS4-LINK-THIN-JOBS-ACTION < %t %s
//
// CHECK-PS4-LINK-THIN-JOBS-ACTION: "-lto-thin-debug-options= -generate-arange-section -threads=5"
-// RUN: %clang -target x86_64-apple-darwin13.3.0 -### %s -flto=thin -flto-jobs=5 2> %t
+// RUN: %clang --target=x86_64-apple-darwin13.3.0 -### %s -flto=thin -flto-jobs=5 2> %t
// RUN: FileCheck -check-prefix=CHECK-LINK-THIN-JOBS2-ACTION < %t %s
//
// CHECK-LINK-THIN-JOBS2-ACTION: "-mllvm" "-threads={{[0-9]+}}"
-// RUN: %clang -target x86_64-unknown-linux -### %s -flto=full 2>&1 | FileCheck --check-prefix=UNIT %s
-// RUN: %clang -target x86_64-unknown-linux -### %s -flto=thin 2>&1 | FileCheck --check-prefix=UNIT %s
-// RUN: %clang -target x86_64-apple-darwin13.3.0 -### %s -flto=full 2>&1 | FileCheck --check-prefix=UNIT %s
-// RUN: %clang -target x86_64-apple-darwin13.3.0 -### %s -flto=thin 2>&1 | FileCheck --check-prefix=UNIT %s
-// RUN: %clang -target x86_64-scei-ps4 -### %s -flto=full 2>&1 | FileCheck --check-prefix=UNIT %s
-// RUN: %clang -target x86_64-scei-ps4 -### %s -flto=thin 2>&1 | FileCheck --check-prefix=UNIT %s
+// RUN: %clang --target=x86_64-unknown-linux -### %s -flto=full 2>&1 | FileCheck --check-prefix=UNIT %s
+// RUN: %clang --target=x86_64-unknown-linux -### %s -flto=thin 2>&1 | FileCheck --check-prefix=UNIT %s
+// RUN: %clang --target=x86_64-apple-darwin13.3.0 -### %s -flto=full 2>&1 | FileCheck --check-prefix=UNIT %s
+// RUN: %clang --target=x86_64-apple-darwin13.3.0 -### %s -flto=thin 2>&1 | FileCheck --check-prefix=UNIT %s
+// RUN: %clang --target=x86_64-scei-ps4 -### %s -flto=full 2>&1 | FileCheck --check-prefix=UNIT %s
+// RUN: %clang --target=x86_64-scei-ps4 -### %s -flto=thin 2>&1 | FileCheck --check-prefix=UNIT %s
// UNIT: "-flto-unit"
// LLVM-LINK: -emit-llvm cannot be used when linking
/// With ld.bfd or gold, link against LLVMgold.
-// RUN: %clang -target x86_64-unknown-linux-gnu --sysroot %S/Inputs/basic_cross_linux_tree %s \
+// RUN: %clang --target=x86_64-unknown-linux-gnu --sysroot=%S/Inputs/basic_cross_linux_tree %s \
// RUN: -fuse-ld=bfd -flto=thin -### 2>&1 | FileCheck --check-prefix=LLVMGOLD %s
-// RUN: %clang -target x86_64-unknown-linux-gnu --sysroot %S/Inputs/basic_cross_linux_tree %s \
+// RUN: %clang --target=x86_64-unknown-linux-gnu --sysroot=%S/Inputs/basic_cross_linux_tree %s \
// RUN: -fuse-ld=gold -flto=full -### 2>&1 | FileCheck --check-prefix=LLVMGOLD %s
-// RUN: %clang -target x86_64-unknown-linux-gnu --sysroot %S/Inputs/basic_cross_linux_tree %s \
+// RUN: %clang --target=x86_64-unknown-linux-gnu --sysroot=%S/Inputs/basic_cross_linux_tree %s \
// RUN: -fuse-ld=gold -fno-lto -flto -### 2>&1 | FileCheck --check-prefix=LLVMGOLD %s
// LLVMGOLD: "-plugin" "{{.*}}{{[/\\]}}LLVMgold.{{dll|dylib|so}}"
/// lld does not need LLVMgold.
-// RUN: %clang -target x86_64-unknown-linux-gnu --sysroot %S/Inputs/basic_cross_linux_tree %s \
+// RUN: %clang --target=x86_64-unknown-linux-gnu --sysroot=%S/Inputs/basic_cross_linux_tree %s \
// RUN: -fuse-ld=lld -flto -### 2>&1 | FileCheck --check-prefix=NO-LLVMGOLD %s
-// RUN: %clang -target x86_64-unknown-linux-gnu --sysroot %S/Inputs/basic_cross_linux_tree %s \
+// RUN: %clang --target=x86_64-unknown-linux-gnu --sysroot=%S/Inputs/basic_cross_linux_tree %s \
// RUN: -fuse-ld=gold -flto -fno-lto -### 2>&1 | FileCheck --check-prefix=NO-LLVMGOLD %s
// NO-LLVMGOLD-NOT: "-plugin" "{{.*}}{{[/\\]}}LLVMgold.{{dll|dylib|so}}"
-// RUN: %clang -target x86_64-unknown-linux-gnu --sysroot %S/Inputs/basic_cross_linux_tree %s \
+// RUN: %clang --target=x86_64-unknown-linux-gnu --sysroot=%S/Inputs/basic_cross_linux_tree %s \
// RUN: -fuse-ld=lld -flto -O -### 2>&1 | FileCheck --check-prefix=O1 %s
-// RUN: %clang -target x86_64-unknown-linux-gnu --sysroot %S/Inputs/basic_cross_linux_tree %s \
+// RUN: %clang --target=x86_64-unknown-linux-gnu --sysroot=%S/Inputs/basic_cross_linux_tree %s \
// RUN: -fuse-ld=lld -flto -O1 -### 2>&1 | FileCheck --check-prefix=O1 %s
-// RUN: %clang -target x86_64-unknown-linux-gnu --sysroot %S/Inputs/basic_cross_linux_tree %s \
+// RUN: %clang --target=x86_64-unknown-linux-gnu --sysroot=%S/Inputs/basic_cross_linux_tree %s \
// RUN: -fuse-ld=lld -flto -Og -### 2>&1 | FileCheck --check-prefix=O1 %s
-// RUN: %clang -target x86_64-unknown-linux-gnu --sysroot %S/Inputs/basic_cross_linux_tree %s \
+// RUN: %clang --target=x86_64-unknown-linux-gnu --sysroot=%S/Inputs/basic_cross_linux_tree %s \
// RUN: -fuse-ld=lld -flto -O2 -### 2>&1 | FileCheck --check-prefix=O2 %s
-// RUN: %clang -target x86_64-unknown-linux-gnu --sysroot %S/Inputs/basic_cross_linux_tree %s \
+// RUN: %clang --target=x86_64-unknown-linux-gnu --sysroot=%S/Inputs/basic_cross_linux_tree %s \
// RUN: -fuse-ld=lld -flto -Os -### 2>&1 | FileCheck --check-prefix=O2 %s
-// RUN: %clang -target x86_64-unknown-linux-gnu --sysroot %S/Inputs/basic_cross_linux_tree %s \
+// RUN: %clang --target=x86_64-unknown-linux-gnu --sysroot=%S/Inputs/basic_cross_linux_tree %s \
// RUN: -fuse-ld=lld -flto -Oz -### 2>&1 | FileCheck --check-prefix=O2 %s
-// RUN: %clang -target x86_64-unknown-linux-gnu --sysroot %S/Inputs/basic_cross_linux_tree %s \
+// RUN: %clang --target=x86_64-unknown-linux-gnu --sysroot=%S/Inputs/basic_cross_linux_tree %s \
// RUN: -fuse-ld=lld -flto -O3 -### 2>&1 | FileCheck --check-prefix=O3 %s
-// RUN: %clang -target x86_64-unknown-linux-gnu --sysroot %S/Inputs/basic_cross_linux_tree %s \
+// RUN: %clang --target=x86_64-unknown-linux-gnu --sysroot=%S/Inputs/basic_cross_linux_tree %s \
// RUN: -fuse-ld=lld -flto -Ofast -### 2>&1 | FileCheck --check-prefix=O3 %s
// O1: -plugin-opt=O1
// O3: -plugin-opt=O3
// -flto passes along an explicit debugger tuning argument.
-// RUN: %clang -target x86_64-unknown-linux -### %s -flto -glldb 2> %t
+// RUN: %clang --target=x86_64-unknown-linux -### %s -flto -glldb 2> %t
// RUN: FileCheck -check-prefix=CHECK-TUNING-LLDB < %t %s
-// RUN: %clang -target x86_64-unknown-linux -### %s -flto -g 2> %t
+// RUN: %clang --target=x86_64-unknown-linux -### %s -flto -g 2> %t
// RUN: FileCheck -check-prefix=CHECK-NO-TUNING < %t %s
//
// CHECK-TUNING-LLDB: "-plugin-opt=-debugger-tune=lldb"
// CHECK-NO-TUNING-NOT: "-plugin-opt=-debugger-tune
//
// -flto=auto and -flto=jobserver pass along -flto=full
-// RUN: %clang -target x86_64-unknown-linux -### %s -flto=auto 2>&1 | FileCheck --check-prefix=FLTO-AUTO %s
-// RUN: %clang -target x86_64-unknown-linux -### %s -flto=jobserver 2>&1 | FileCheck --check-prefix=FLTO-JOBSERVER %s
+// RUN: %clang --target=x86_64-unknown-linux -### %s -flto=auto 2>&1 | FileCheck --check-prefix=FLTO-AUTO %s
+// RUN: %clang --target=x86_64-unknown-linux -### %s -flto=jobserver 2>&1 | FileCheck --check-prefix=FLTO-JOBSERVER %s
//
// FLTO-AUTO: -flto=full
// FLTO-JOBSERVER: -flto=full
//
// Pass the last -flto argument.
-// RUN: %clang -target x86_64-unknown-linux -### %s -flto=thin -flto 2>&1 | \
+// RUN: %clang --target=x86_64-unknown-linux -### %s -flto=thin -flto 2>&1 | \
// RUN: FileCheck --check-prefix=FLTO-FULL %s
-// RUN: %clang -target x86_64-unknown-linux -### %s -flto=thin -flto=full \
+// RUN: %clang --target=x86_64-unknown-linux -### %s -flto=thin -flto=full \
// RUN: 2>&1 | FileCheck --check-prefix=FLTO-FULL %s
-// RUN: %clang -target x86_64-unknown-linux -### %s -flto=full -flto=thin \
+// RUN: %clang --target=x86_64-unknown-linux -### %s -flto=full -flto=thin \
// RUN: 2>&1 | FileCheck --check-prefix=FLTO-THIN %s
-// RUN: %clang -target x86_64-unknown-linux -### %s -flto -flto=thin 2>&1 | \
+// RUN: %clang --target=x86_64-unknown-linux -### %s -flto -flto=thin 2>&1 | \
// RUN: FileCheck --check-prefix=FLTO-THIN %s
//
// FLTO-FULL-NOT: -flto=thin
// FLTO-THIN-NOT: "-flto"
// FLTO-THIN: -flto=thin
// FLTO-THIN-NOT: "-flto"
-// FLTO-THIN-NOT: -flto=full
\ No newline at end of file
+// FLTO-THIN-NOT: -flto=full
// LLVM-LINK: -emit-llvm cannot be used when linking
/// With ld.bfd or gold, link against LLVMgold.
-// RUN: %clangxx -nocudainc -nocudalib -target x86_64-unknown-linux-gnu --sysroot %S/Inputs/basic_cross_linux_tree %s \
+// RUN: %clangxx -nocudainc -nocudalib --target=x86_64-unknown-linux-gnu --sysroot=%S/Inputs/basic_cross_linux_tree %s \
// RUN: -fuse-ld=bfd -flto=thin -### 2>&1 | FileCheck --check-prefix=LLVMGOLD %s
-// RUN: %clangxx -nocudainc -nocudalib -target x86_64-unknown-linux-gnu --sysroot %S/Inputs/basic_cross_linux_tree %s \
+// RUN: %clangxx -nocudainc -nocudalib --target=x86_64-unknown-linux-gnu --sysroot=%S/Inputs/basic_cross_linux_tree %s \
// RUN: -fuse-ld=gold -flto=full -### 2>&1 | FileCheck --check-prefix=LLVMGOLD %s
//
// LLVMGOLD: "-plugin" "{{.*}}{{[/\\]}}LLVMgold.{{dll|dylib|so}}"
/// lld does not need LLVMgold.
-// RUN: %clangxx -nocudainc -nocudalib -target x86_64-unknown-linux-gnu --sysroot %S/Inputs/basic_cross_linux_tree %s \
+// RUN: %clangxx -nocudainc -nocudalib --target=x86_64-unknown-linux-gnu --sysroot=%S/Inputs/basic_cross_linux_tree %s \
// RUN: -fuse-ld=lld -flto=full -### 2>&1 | FileCheck --check-prefix=NO-LLVMGOLD %s
-// RUN: %clangxx -nocudainc -nocudalib -target x86_64-unknown-linux-gnu --sysroot %S/Inputs/basic_cross_linux_tree %s \
+// RUN: %clangxx -nocudainc -nocudalib --target=x86_64-unknown-linux-gnu --sysroot=%S/Inputs/basic_cross_linux_tree %s \
// RUN: -fuse-ld=gold -flto=full -fno-lto -### 2>&1 | FileCheck --check-prefix=NO-LLVMGOLD %s
//
// NO-LLVMGOLD-NOT: "-plugin" "{{.*}}{{[/\\]}}LLVMgold.{{dll|dylib|so}}"
// -flto passes along an explicit debugger tuning argument.
// RUN: %clangxx -nocudainc -nocudalib \
-// RUN: -target x86_64-unknown-linux -### %s -flto -glldb 2> %t
+// RUN: --target=x86_64-unknown-linux -### %s -flto -glldb 2> %t
// RUN: FileCheck -check-prefix=CHECK-TUNING-LLDB < %t %s
// RUN: %clangxx -nocudainc -nocudalib \
-// RUN: -target x86_64-unknown-linux -### %s -flto -g 2> %t
+// RUN: --target=x86_64-unknown-linux -### %s -flto -g 2> %t
// RUN: FileCheck -check-prefix=CHECK-NO-TUNING < %t %s
//
// CHECK-TUNING-LLDB: "-plugin-opt=-debugger-tune=lldb"
// RUN: rm -f %t*
// -O1, no tagging
-// RUN: %clang -O1 -target aarch64-unknown-linux -mllvm -stack-safety-print %s -S -o - 2>&1 | FileCheck %s
+// RUN: %clang -O1 --target=aarch64-unknown-linux -mllvm -stack-safety-print %s -S -o - 2>&1 | FileCheck %s
// Full LTO
-// RUN: %clang -O1 -target aarch64-unknown-linux -c %s -Xclang -opaque-pointers -flto=full -o %t.ltonewpm1.bc
-// RUN: %clang -O1 -target aarch64-unknown-linux -c -DBUILD2 %s -Xclang -opaque-pointers -flto=full -o %t.ltonewpm2.bc
+// RUN: %clang -O1 --target=aarch64-unknown-linux -c %s -Xclang -opaque-pointers -flto=full -o %t.ltonewpm1.bc
+// RUN: %clang -O1 --target=aarch64-unknown-linux -c -DBUILD2 %s -Xclang -opaque-pointers -flto=full -o %t.ltonewpm2.bc
// RUN: llvm-lto2 run -o %t.ltonewpm %t.ltonewpm1.bc %t.ltonewpm2.bc -save-temps -stack-safety-print -thinlto-threads 1 -O1 \
// RUN: -r %t.ltonewpm1.bc,fn,plx \
// RUN: -r %t.ltonewpm1.bc,use,lx \
// RUN: -r %t.ltonewpm2.bc,z, 2>&1 | FileCheck %s --allow-empty
// Thin LTO, new PM
-// RUN: %clang -O1 -target aarch64-unknown-linux -c %s -Xclang -opaque-pointers -flto=thin -o %t.thinltonewpm1.bc
-// RUN: %clang -O1 -target aarch64-unknown-linux -c -DBUILD2 %s -Xclang -opaque-pointers -flto=thin -o %t.thinltonewpm2.bc
+// RUN: %clang -O1 --target=aarch64-unknown-linux -c %s -Xclang -opaque-pointers -flto=thin -o %t.thinltonewpm1.bc
+// RUN: %clang -O1 --target=aarch64-unknown-linux -c -DBUILD2 %s -Xclang -opaque-pointers -flto=thin -o %t.thinltonewpm2.bc
// RUN: llvm-lto2 run -o %t.thinltonewpm %t.thinltonewpm1.bc %t.thinltonewpm2.bc -save-temps -stack-safety-print -thinlto-threads 1 -O1 \
// RUN: -r %t.thinltonewpm1.bc,fn,plx \
// RUN: -r %t.thinltonewpm1.bc,use,lx \
// RUN: rm -f %t*
// -O0: both are unsafe.
-// RUN: %clang -O0 -target aarch64-unknown-linux -march=armv8+memtag -fsanitize=memtag-stack -mllvm -stack-safety-print %s -S -o - 2>&1 | FileCheck %s
+// RUN: %clang -O0 --target=aarch64-unknown-linux -march=armv8+memtag -fsanitize=memtag-stack -mllvm -stack-safety-print %s -S -o - 2>&1 | FileCheck %s
// No LTO: just one is safe.
-// RUN: %clang -O1 -target aarch64-unknown-linux -march=armv8+memtag -fsanitize=memtag-stack -mllvm -stack-safety-print %s -S -o /dev/null 2>&1 | FileCheck %s -check-prefixes=SSI,XUNSAFE,YSAFE
+// RUN: %clang -O1 --target=aarch64-unknown-linux -march=armv8+memtag -fsanitize=memtag-stack -mllvm -stack-safety-print %s -S -o /dev/null 2>&1 | FileCheck %s -check-prefixes=SSI,XUNSAFE,YSAFE
// Full LTO: both are safe.
-// RUN: %clang -O1 -target aarch64-unknown-linux -march=armv8+memtag -fsanitize=memtag-stack -c %s -Xclang -opaque-pointers -flto=full -o %t.ltonewpm1.bc
-// RUN: %clang -O1 -target aarch64-unknown-linux -march=armv8+memtag -fsanitize=memtag-stack -c -DBUILD2 %s -Xclang -opaque-pointers -flto=full -o %t.ltonewpm2.bc
+// RUN: %clang -O1 --target=aarch64-unknown-linux -march=armv8+memtag -fsanitize=memtag-stack -c %s -Xclang -opaque-pointers -flto=full -o %t.ltonewpm1.bc
+// RUN: %clang -O1 --target=aarch64-unknown-linux -march=armv8+memtag -fsanitize=memtag-stack -c -DBUILD2 %s -Xclang -opaque-pointers -flto=full -o %t.ltonewpm2.bc
// RUN: llvm-lto2 run -o %t.ltonewpm %t.ltonewpm1.bc %t.ltonewpm2.bc -save-temps -stack-safety-print -thinlto-threads 1 -O1 \
// RUN: -r %t.ltonewpm1.bc,fn,plx \
// RUN: -r %t.ltonewpm1.bc,use,lx \
// RUN: -r %t.ltonewpm2.bc,z, 2>&1 | FileCheck %s -check-prefixes=SSI,XSAFE,YSAFE
// Thin LTO: both are safe.
-// RUN: %clang -O1 -target aarch64-unknown-linux -march=armv8+memtag -fsanitize=memtag-stack -c %s -Xclang -opaque-pointers -flto=thin -o %t.thinltonewpm1.bc
-// RUN: %clang -O1 -target aarch64-unknown-linux -march=armv8+memtag -fsanitize=memtag-stack -c -DBUILD2 %s -Xclang -opaque-pointers -flto=thin -o %t.thinltonewpm2.bc
+// RUN: %clang -O1 --target=aarch64-unknown-linux -march=armv8+memtag -fsanitize=memtag-stack -c %s -Xclang -opaque-pointers -flto=thin -o %t.thinltonewpm1.bc
+// RUN: %clang -O1 --target=aarch64-unknown-linux -march=armv8+memtag -fsanitize=memtag-stack -c -DBUILD2 %s -Xclang -opaque-pointers -flto=thin -o %t.thinltonewpm2.bc
// RUN: llvm-lto2 run -o %t.thinltonewpm %t.thinltonewpm1.bc %t.thinltonewpm2.bc -save-temps -stack-safety-print -thinlto-threads 1 -O1 \
// RUN: -r %t.thinltonewpm1.bc,fn,plx \
// RUN: -r %t.thinltonewpm1.bc,use,lx \
// The default linker doesn't support LLVM bitcode
-// RUN: not %clang -target i686-pc-windows-gnu %s -flto -fuse-ld=bfd
+// RUN: not %clang --target=i686-pc-windows-gnu %s -flto -fuse-ld=bfd
// When using lld, this is allowed though.
-// RUN: %clang -target i686-pc-windows-gnu -### %s -flto -fuse-ld=lld
+// RUN: %clang --target=i686-pc-windows-gnu -### %s -flto -fuse-ld=lld
-// RUN: %clang -target x86_64-unknown-linux -### %s -flto=thin 2>&1 | FileCheck --check-prefix=NOUNIT %s
-// RUN: %clang -target x86_64-unknown-linux -### %s -flto=thin -fsplit-lto-unit 2>&1 | FileCheck --check-prefix=UNIT %s
-// RUN: %clang -target x86_64-unknown-linux -### %s -flto=thin -fno-split-lto-unit 2>&1 | FileCheck --check-prefix=NOUNIT %s
-// RUN: %clang -target x86_64-unknown-linux -### %s -flto=thin -fno-split-lto-unit -fwhole-program-vtables 2>&1 | FileCheck --check-prefix=ERROR1 %s
-// RUN: %clang -target x86_64-unknown-linux -### %s -flto=thin -fno-split-lto-unit -fsanitize=cfi 2>&1 | FileCheck --check-prefix=ERROR2 %s
-// RUN: %clang -target x86_64-apple-darwin13.3.0 -### %s -fwhole-program-vtables -flto=full 2>&1 | FileCheck --check-prefix=UNIT %s
-// RUN: %clang -target x86_64-apple-darwin13.3.0 -### %s -fwhole-program-vtables -flto=thin 2>&1 | FileCheck --check-prefix=NOUNIT %s
-// RUN: %clang -target x86_64-scei-ps4 -### %s -fwhole-program-vtables -flto=full 2>&1 | FileCheck --check-prefix=UNIT %s
-// RUN: %clang -target x86_64-scei-ps4 -### %s -fwhole-program-vtables -flto=thin 2>&1 | FileCheck --check-prefix=NOUNIT %s
+// RUN: %clang --target=x86_64-unknown-linux -### %s -flto=thin 2>&1 | FileCheck --check-prefix=NOUNIT %s
+// RUN: %clang --target=x86_64-unknown-linux -### %s -flto=thin -fsplit-lto-unit 2>&1 | FileCheck --check-prefix=UNIT %s
+// RUN: %clang --target=x86_64-unknown-linux -### %s -flto=thin -fno-split-lto-unit 2>&1 | FileCheck --check-prefix=NOUNIT %s
+// RUN: %clang --target=x86_64-unknown-linux -### %s -flto=thin -fno-split-lto-unit -fwhole-program-vtables 2>&1 | FileCheck --check-prefix=ERROR1 %s
+// RUN: %clang --target=x86_64-unknown-linux -### %s -flto=thin -fno-split-lto-unit -fsanitize=cfi 2>&1 | FileCheck --check-prefix=ERROR2 %s
+// RUN: %clang --target=x86_64-apple-darwin13.3.0 -### %s -fwhole-program-vtables -flto=full 2>&1 | FileCheck --check-prefix=UNIT %s
+// RUN: %clang --target=x86_64-apple-darwin13.3.0 -### %s -fwhole-program-vtables -flto=thin 2>&1 | FileCheck --check-prefix=NOUNIT %s
+// RUN: %clang --target=x86_64-scei-ps4 -### %s -fwhole-program-vtables -flto=full 2>&1 | FileCheck --check-prefix=UNIT %s
+// RUN: %clang --target=x86_64-scei-ps4 -### %s -fwhole-program-vtables -flto=thin 2>&1 | FileCheck --check-prefix=NOUNIT %s
// UNIT: "-fsplit-lto-unit"
// NOUNIT-NOT: "-fsplit-lto-unit"