Author: Fangrui Song Date: 2023-05-26T19:01:39-07:00 New Revision: af7aea365a2ae8dc51938a614353e1586072ef83
URL: https://github.com/llvm/llvm-project/commit/af7aea365a2ae8dc51938a614353e1586072ef83 DIFF: https://github.com/llvm/llvm-project/commit/af7aea365a2ae8dc51938a614353e1586072ef83.diff LOG: [Driver][test] Replace legacy -target with --target= Added: Modified: clang/test/Driver/cspgo-lto.c clang/test/Driver/cuda-no-pgo-or-coverage.cu clang/test/Driver/darwin-ld-lto-lld.c clang/test/Driver/darwin-ld-lto.c clang/test/Driver/gold-lto-samplepgo.c clang/test/Driver/lto-dwo.c clang/test/Driver/lto-jobs.c clang/test/Driver/lto-unit.c clang/test/Driver/lto.c clang/test/Driver/lto.cu clang/test/Driver/memtag-stack_lto.c clang/test/Driver/mingw-lto.c clang/test/Driver/split-lto-unit.c Removed: ################################################################################ diff --git a/clang/test/Driver/cspgo-lto.c b/clang/test/Driver/cspgo-lto.c index 52d4f2487b0d..d793400889d8 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 15bc0100e3dc..01449fe7ae83 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 2d1ed86ebcda..2f44cad534b1 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 2e049769b0cd..386a8edecbe4 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 ee4b51c4085f..1ae6cc52fe0d 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 486ace43f01a..0bac5f25d4da 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 5402442ce697..73d7a94dd289 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 0fdd493888d9..43a9c24088ed 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 b1d729a1ece7..2c540780ba4f 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 cc96f12d4029..baa03c4ecb49 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 3cafe83069a0..171457decb51 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 8bb4aedefd66..c436a680320d 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 66314161c942..4f0a4ccf4903 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" _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits