From af7aea365a2ae8dc51938a614353e1586072ef83 Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Fri, 26 May 2023 19:01:39 -0700 Subject: [PATCH] [Driver][test] Replace legacy -target with --target= --- clang/test/Driver/cspgo-lto.c | 2 +- clang/test/Driver/cuda-no-pgo-or-coverage.cu | 10 +++---- clang/test/Driver/darwin-ld-lto-lld.c | 4 +-- clang/test/Driver/darwin-ld-lto.c | 12 ++++---- clang/test/Driver/gold-lto-samplepgo.c | 2 +- clang/test/Driver/lto-dwo.c | 2 +- clang/test/Driver/lto-jobs.c | 8 ++--- clang/test/Driver/lto-unit.c | 12 ++++---- clang/test/Driver/lto.c | 44 ++++++++++++++-------------- clang/test/Driver/lto.cu | 12 ++++---- clang/test/Driver/memtag-stack_lto.c | 22 +++++++------- clang/test/Driver/mingw-lto.c | 4 +-- clang/test/Driver/split-lto-unit.c | 18 ++++++------ 13 files changed, 76 insertions(+), 76 deletions(-) diff --git a/clang/test/Driver/cspgo-lto.c b/clang/test/Driver/cspgo-lto.c index 52d4f24..d793400 100644 --- a/clang/test/Driver/cspgo-lto.c +++ b/clang/test/Driver/cspgo-lto.c @@ -1,6 +1,6 @@ // 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 diff --git a/clang/test/Driver/cuda-no-pgo-or-coverage.cu b/clang/test/Driver/cuda-no-pgo-or-coverage.cu index 15bc010..01449fe 100644 --- a/clang/test/Driver/cuda-no-pgo-or-coverage.cu +++ b/clang/test/Driver/cuda-no-pgo-or-coverage.cu @@ -2,23 +2,23 @@ // 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 // diff --git a/clang/test/Driver/darwin-ld-lto-lld.c b/clang/test/Driver/darwin-ld-lto-lld.c index 2d1ed86..2f44cad 100644 --- a/clang/test/Driver/darwin-ld-lto-lld.c +++ b/clang/test/Driver/darwin-ld-lto-lld.c @@ -5,13 +5,13 @@ // 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)?"}} diff --git a/clang/test/Driver/darwin-ld-lto.c b/clang/test/Driver/darwin-ld-lto.c index 2e04976..386a8ed 100644 --- a/clang/test/Driver/darwin-ld-lto.c +++ b/clang/test/Driver/darwin-ld-lto.c @@ -5,7 +5,7 @@ // 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 // @@ -14,19 +14,19 @@ // 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)?"}} @@ -35,7 +35,7 @@ // 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" @@ -44,7 +44,7 @@ // 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" diff --git a/clang/test/Driver/gold-lto-samplepgo.c b/clang/test/Driver/gold-lto-samplepgo.c index ee4b51c..1ae6cc5 100644 --- a/clang/test/Driver/gold-lto-samplepgo.c +++ b/clang/test/Driver/gold-lto-samplepgo.c @@ -1,6 +1,6 @@ // 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 diff --git a/clang/test/Driver/lto-dwo.c b/clang/test/Driver/lto-dwo.c index 486ace4..0bac5f2 100644 --- a/clang/test/Driver/lto-dwo.c +++ b/clang/test/Driver/lto-dwo.c @@ -1,6 +1,6 @@ // 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" diff --git a/clang/test/Driver/lto-jobs.c b/clang/test/Driver/lto-jobs.c index 5402442..73d7a94 100644 --- a/clang/test/Driver/lto-jobs.c +++ b/clang/test/Driver/lto-jobs.c @@ -1,19 +1,19 @@ // 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]+}}" diff --git a/clang/test/Driver/lto-unit.c b/clang/test/Driver/lto-unit.c index 0fdd493..43a9c24 100644 --- a/clang/test/Driver/lto-unit.c +++ b/clang/test/Driver/lto-unit.c @@ -1,8 +1,8 @@ -// 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" diff --git a/clang/test/Driver/lto.c b/clang/test/Driver/lto.c index b1d729a1..2c54078 100644 --- a/clang/test/Driver/lto.c +++ b/clang/test/Driver/lto.c @@ -33,36 +33,36 @@ // 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 @@ -70,30 +70,30 @@ // 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 @@ -104,4 +104,4 @@ // 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 diff --git a/clang/test/Driver/lto.cu b/clang/test/Driver/lto.cu index cc96f12..baa03c4 100644 --- a/clang/test/Driver/lto.cu +++ b/clang/test/Driver/lto.cu @@ -47,27 +47,27 @@ // 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" diff --git a/clang/test/Driver/memtag-stack_lto.c b/clang/test/Driver/memtag-stack_lto.c index 3cafe83..171457de 100644 --- a/clang/test/Driver/memtag-stack_lto.c +++ b/clang/test/Driver/memtag-stack_lto.c @@ -5,11 +5,11 @@ // 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 \ @@ -19,8 +19,8 @@ // 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 \ @@ -33,14 +33,14 @@ // 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 \ @@ -50,8 +50,8 @@ // 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 \ diff --git a/clang/test/Driver/mingw-lto.c b/clang/test/Driver/mingw-lto.c index 8bb4aed..c436a68 100644 --- a/clang/test/Driver/mingw-lto.c +++ b/clang/test/Driver/mingw-lto.c @@ -1,4 +1,4 @@ // 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 diff --git a/clang/test/Driver/split-lto-unit.c b/clang/test/Driver/split-lto-unit.c index 6631416..4f0a4cc 100644 --- a/clang/test/Driver/split-lto-unit.c +++ b/clang/test/Driver/split-lto-unit.c @@ -1,12 +1,12 @@ -// 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" -- 2.7.4