Skip to content

Commit 784e0cf

Browse files
committed
[Driver][test] Replace legacy -target with --target=
Similar to previous cleanup.
1 parent f35719f commit 784e0cf

File tree

5 files changed

+50
-50
lines changed

5 files changed

+50
-50
lines changed

clang/test/Driver/B-opt.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
11
// Check -B driver option.
22

33
/// Target triple prefix is not detected for -B.
4-
// RUN: %clang %s -### -o %t.o -target i386-unknown-linux \
4+
// RUN: %clang %s -### -o %t.o --target=i386-unknown-linux \
55
// RUN: -B %S/Inputs/B_opt_tree/dir1 -fuse-ld=ld 2>&1 \
66
// RUN: | FileCheck --check-prefix=CHECK-B-OPT-TRIPLE %s
77
// CHECK-B-OPT-TRIPLE-NOT: "{{.*}}/Inputs/B_opt_tree/dir1{{/|\\\\}}i386-unknown-linux-ld"
88
//
9-
// RUN: %clang %s -### -o %t.o -target i386-unknown-linux \
9+
// RUN: %clang %s -### -o %t.o --target=i386-unknown-linux \
1010
// RUN: -B %S/Inputs/B_opt_tree/dir2 -fuse-ld=ld 2>&1 \
1111
// RUN: | FileCheck --check-prefix=CHECK-B-OPT-DIR %s
1212
// CHECK-B-OPT-DIR: "{{.*}}/Inputs/B_opt_tree/dir2{{/|\\\\}}ld"
1313
//
14-
// RUN: %clang %s -### -o %t.o -target i386-unknown-linux \
14+
// RUN: %clang %s -### -o %t.o --target=i386-unknown-linux \
1515
// RUN: -B %S/Inputs/B_opt_tree/dir3/prefix- -fuse-ld=ld 2>&1 \
1616
// RUN: | FileCheck --check-prefix=CHECK-B-OPT-PREFIX %s
1717
// CHECK-B-OPT-PREFIX: "{{.*}}/Inputs/B_opt_tree/dir3{{/|\\\\}}prefix-ld"
1818
//
19-
// RUN: %clang %s -### -o %t.o -target i386-unknown-linux \
19+
// RUN: %clang %s -### -o %t.o --target=i386-unknown-linux \
2020
// RUN: -B %S/Inputs/B_opt_tree/dir3/prefix- \
2121
// RUN: -B %S/Inputs/B_opt_tree/dir2 2>&1 -fuse-ld=ld \
2222
// RUN: | FileCheck --check-prefix=CHECK-B-OPT-MULT %s
2323
// CHECK-B-OPT-MULT: "{{.*}}/Inputs/B_opt_tree/dir3{{/|\\\\}}prefix-ld"
2424
//
2525
// RUN: %clang -B %S/Inputs/does_not_exist -print-search-dirs \
26-
// RUN: -target aarch64-linux-gnu \
26+
// RUN: --target=aarch64-linux-gnu \
2727
// RUN: | FileCheck --check-prefix=CHECK-B-OPT-INVALID %s
2828
// CHECK-B-OPT-INVALID-NOT: /..//bin

clang/test/Driver/as-options.s

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,36 @@
11
// PR21000: Test that -I is passed to both external and integrated assemblers.
22

3-
// RUN: %clang -target x86_64-linux-gnu -c -no-integrated-as %s \
3+
// RUN: %clang --target=x86_64-linux-gnu -c -no-integrated-as %s \
44
// RUN: -Ifoo_dir -### 2>&1 \
55
// RUN: | FileCheck %s
66

7-
// RUN: %clang -target x86_64-linux-gnu -c -no-integrated-as %s \
7+
// RUN: %clang --target=x86_64-linux-gnu -c -no-integrated-as %s \
88
// RUN: -I foo_dir -### 2>&1 \
99
// RUN: | FileCheck %s
1010

11-
// RUN: %clang -target x86_64-linux-gnu -c -integrated-as %s \
11+
// RUN: %clang --target=x86_64-linux-gnu -c -integrated-as %s \
1212
// RUN: -Ifoo_dir -### 2>&1 \
1313
// RUN: | FileCheck %s
1414

15-
// RUN: %clang -target x86_64-linux-gnu -c -integrated-as %s \
15+
// RUN: %clang --target=x86_64-linux-gnu -c -integrated-as %s \
1616
// RUN: -I foo_dir -### 2>&1 \
1717
// RUN: | FileCheck %s
1818

1919
// Other GNU targets
2020

21-
// RUN: %clang -target aarch64-linux-gnu -c -no-integrated-as %s \
21+
// RUN: %clang --target=aarch64-linux-gnu -c -no-integrated-as %s \
2222
// RUN: -Ifoo_dir -### 2>&1 \
2323
// RUN: | FileCheck %s
2424

25-
// RUN: %clang -target aarch64-linux-gnu -c -integrated-as %s \
25+
// RUN: %clang --target=aarch64-linux-gnu -c -integrated-as %s \
2626
// RUN: -Ifoo_dir -### 2>&1 \
2727
// RUN: | FileCheck %s
2828

29-
// RUN: %clang -target armv7-linux-gnueabihf -c -no-integrated-as %s \
29+
// RUN: %clang --target=armv7-linux-gnueabihf -c -no-integrated-as %s \
3030
// RUN: -Ifoo_dir -### 2>&1 \
3131
// RUN: | FileCheck %s
3232

33-
// RUN: %clang -target armv7-linux-gnueabihf -c -integrated-as %s \
33+
// RUN: %clang --target=armv7-linux-gnueabihf -c -integrated-as %s \
3434
// RUN: -Ifoo_dir -### 2>&1 \
3535
// RUN: | FileCheck %s
3636

@@ -53,45 +53,45 @@
5353
// RUN: -o /dev/null -x assembler-with-cpp %s 2>&1 \
5454
// RUN: | FileCheck --check-prefix=WARN --allow-empty %s
5555

56-
// RUN: %clang -mimplicit-it=always -target armv7-linux-gnueabi -E \
56+
// RUN: %clang -mimplicit-it=always --target=armv7-linux-gnueabi -E \
5757
// RUN: -fintegrated-as -o /dev/null -x c++ %s 2>&1 \
5858
// RUN: | FileCheck --check-prefix=NOWARN --allow-empty %s
59-
// RUN: %clang -mimplicit-it=always -target armv7-linux-gnueabi -E \
59+
// RUN: %clang -mimplicit-it=always --target=armv7-linux-gnueabi -E \
6060
// RUN: -fno-integrated-as -o /dev/null -x c++ %s 2>&1 \
6161
// RUN: | FileCheck --check-prefix=WARN --allow-empty %s
6262

63-
// RUN: %clang -mimplicit-it=always -target armv7-linux-gnueabi -E \
63+
// RUN: %clang -mimplicit-it=always --target=armv7-linux-gnueabi -E \
6464
// RUN: -fintegrated-as -o /dev/null -x assembler-with-cpp %s 2>&1 \
6565
// RUN: | FileCheck --check-prefix=NOWARN --allow-empty %s
66-
// RUN: %clang -mimplicit-it=always -target armv7-linux-gnueabi -E \
66+
// RUN: %clang -mimplicit-it=always --target=armv7-linux-gnueabi -E \
6767
// RUN: -fno-integrated-as -o /dev/null -x assembler-with-cpp %s 2>&1 \
6868
// RUN: | FileCheck --check-prefix=WARN --allow-empty %s
6969

70-
// RUN: %clang -Wa,-mbig-obj -target i386-pc-windows -E -fintegrated-as \
70+
// RUN: %clang -Wa,-mbig-obj --target=i386-pc-windows -E -fintegrated-as \
7171
// RUN: -o /dev/null -x c++ %s 2>&1 \
7272
// RUN: | FileCheck --check-prefix=NOWARN --allow-empty %s
73-
// RUN: %clang -Wa,-mbig-obj -target i386-pc-windows -E -fno-integrated-as \
73+
// RUN: %clang -Wa,-mbig-obj --target=i386-pc-windows -E -fno-integrated-as \
7474
// RUN: -o /dev/null -x c++ %s 2>&1 \
7575
// RUN: | FileCheck --check-prefix=NOWARN --allow-empty %s
7676

77-
// RUN: %clang -Wa,-mbig-obj -target i386-pc-windows -E -fintegrated-as \
77+
// RUN: %clang -Wa,-mbig-obj --target=i386-pc-windows -E -fintegrated-as \
7878
// RUN: -o /dev/null -x assembler-with-cpp %s 2>&1 \
7979
// RUN: | FileCheck --check-prefix=NOWARN --allow-empty %s
80-
// RUN: %clang -Wa,-mbig-obj -target i386-pc-windows -E -fno-integrated-as \
80+
// RUN: %clang -Wa,-mbig-obj --target=i386-pc-windows -E -fno-integrated-as \
8181
// RUN: -o /dev/null -x assembler-with-cpp %s 2>&1 \
8282
// RUN: | FileCheck --check-prefix=NOWARN --allow-empty %s
8383

84-
// RUN: %clang -Xassembler -mbig-obj -target i386-pc-windows -E -fintegrated-as \
84+
// RUN: %clang -Xassembler -mbig-obj --target=i386-pc-windows -E -fintegrated-as \
8585
// RUN: -o /dev/null -x c++ %s 2>&1 \
8686
// RUN: | FileCheck --check-prefix=NOWARN --allow-empty %s
87-
// RUN: %clang -Xassembler -mbig-obj -target i386-pc-windows -E \
87+
// RUN: %clang -Xassembler -mbig-obj --target=i386-pc-windows -E \
8888
// RUN: -fno-integrated-as -o /dev/null -x c++ %s 2>&1 \
8989
// RUN: | FileCheck --check-prefix=NOWARN --allow-empty %s
9090

91-
// RUN: %clang -Xassembler -mbig-obj -target i386-pc-windows -E -fintegrated-as \
91+
// RUN: %clang -Xassembler -mbig-obj --target=i386-pc-windows -E -fintegrated-as \
9292
// RUN: -o /dev/null -x assembler-with-cpp %s 2>&1 \
9393
// RUN: | FileCheck --check-prefix=NOWARN --allow-empty %s
94-
// RUN: %clang -Xassembler -mbig-obj -target i386-pc-windows -E \
94+
// RUN: %clang -Xassembler -mbig-obj --target=i386-pc-windows -E \
9595
// RUN: -fno-integrated-as -o /dev/null -x assembler-with-cpp %s 2>&1 \
9696
// RUN: | FileCheck --check-prefix=NOWARN --allow-empty %s
9797

clang/test/Driver/clang_f_opts.c

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -463,8 +463,8 @@
463463
// RUN: %clang -### -S -fno-unsigned-char %s 2>&1 | FileCheck -check-prefix=CHAR-SIGN4 %s
464464
// CHAR-SIGN4-NOT: -fno-signed-char
465465

466-
// RUN: %clang -target x86_64-unknown-none-none -### -fshort-wchar -fno-short-wchar %s 2>&1 | FileCheck -check-prefix=CHECK-WCHAR1 -check-prefix=DELIMITERS %s
467-
// RUN: %clang -target x86_64-unknown-none-none -### -fno-short-wchar -fshort-wchar %s 2>&1 | FileCheck -check-prefix=CHECK-WCHAR2 -check-prefix=DELIMITERS %s
466+
// RUN: %clang --target=x86_64-unknown-none-none -### -fshort-wchar -fno-short-wchar %s 2>&1 | FileCheck -check-prefix=CHECK-WCHAR1 -check-prefix=DELIMITERS %s
467+
// RUN: %clang --target=x86_64-unknown-none-none -### -fno-short-wchar -fshort-wchar %s 2>&1 | FileCheck -check-prefix=CHECK-WCHAR2 -check-prefix=DELIMITERS %s
468468
// Make sure we don't match the -NOT lines with the linker invocation.
469469
// Delimiters match the start of the cc1 and the start of the linker lines
470470
// DELIMITERS: {{^ (\(in-process\)|")}}
@@ -489,7 +489,7 @@
489489
// CHECK-ALLOW-PLACEHOLDERS: -fallow-editor-placeholders
490490
// CHECK-NO-ALLOW-PLACEHOLDERS-NOT: -fallow-editor-placeholders
491491

492-
// RUN: %clang -### -target x86_64-unknown-windows-msvc -fno-short-wchar %s 2>&1 | FileCheck -check-prefix CHECK-WINDOWS-ISO10646 %s
492+
// RUN: %clang -### --target=x86_64-unknown-windows-msvc -fno-short-wchar %s 2>&1 | FileCheck -check-prefix CHECK-WINDOWS-ISO10646 %s
493493
// CHECK-WINDOWS-ISO10646: "-fwchar-type=int"
494494
// CHECK-WINDOWS-ISO10646: "-fsigned-wchar"
495495

@@ -530,16 +530,16 @@
530530
// CHECK-NO-NULL-POINTER-CHECKS: "-fno-delete-null-pointer-checks"
531531
// CHECK-NULL-POINTER-CHECKS-NOT: "-fno-delete-null-pointer-checks"
532532

533-
// RUN: %clang -### -S -target x86_64-unknown-linux -frecord-gcc-switches %s 2>&1 | FileCheck -check-prefix=CHECK-RECORD-GCC-SWITCHES %s
534-
// RUN: %clang -### -S -target x86_64-unknown-linux -fno-record-gcc-switches %s 2>&1 | FileCheck -check-prefix=CHECK-NO-RECORD-GCC-SWITCHES %s
535-
// RUN: %clang -### -S -target x86_64-unknown-linux -fno-record-gcc-switches -frecord-gcc-switches %s 2>&1 | FileCheck -check-prefix=CHECK-RECORD-GCC-SWITCHES %s
536-
// RUN: %clang -### -S -target x86_64-unknown-linux -frecord-gcc-switches -fno-record-gcc-switches %s 2>&1 | FileCheck -check-prefix=CHECK-NO-RECORD-GCC-SWITCHES %s
537-
// RUN: %clang -### -S -target x86_64-unknown-linux -frecord-command-line %s 2>&1 | FileCheck -check-prefix=CHECK-RECORD-GCC-SWITCHES %s
538-
// RUN: %clang -### -S -target x86_64-unknown-linux -fno-record-command-line %s 2>&1 | FileCheck -check-prefix=CHECK-NO-RECORD-GCC-SWITCHES %s
539-
// RUN: %clang -### -S -target x86_64-unknown-linux -fno-record-command-line -frecord-command-line %s 2>&1 | FileCheck -check-prefix=CHECK-RECORD-GCC-SWITCHES %s
540-
// RUN: %clang -### -S -target x86_64-unknown-linux -frecord-command-line -fno-record-command-line %s 2>&1 | FileCheck -check-prefix=CHECK-NO-RECORD-GCC-SWITCHES %s
533+
// RUN: %clang -### -S --target=x86_64-unknown-linux -frecord-gcc-switches %s 2>&1 | FileCheck -check-prefix=CHECK-RECORD-GCC-SWITCHES %s
534+
// RUN: %clang -### -S --target=x86_64-unknown-linux -fno-record-gcc-switches %s 2>&1 | FileCheck -check-prefix=CHECK-NO-RECORD-GCC-SWITCHES %s
535+
// RUN: %clang -### -S --target=x86_64-unknown-linux -fno-record-gcc-switches -frecord-gcc-switches %s 2>&1 | FileCheck -check-prefix=CHECK-RECORD-GCC-SWITCHES %s
536+
// RUN: %clang -### -S --target=x86_64-unknown-linux -frecord-gcc-switches -fno-record-gcc-switches %s 2>&1 | FileCheck -check-prefix=CHECK-NO-RECORD-GCC-SWITCHES %s
537+
// RUN: %clang -### -S --target=x86_64-unknown-linux -frecord-command-line %s 2>&1 | FileCheck -check-prefix=CHECK-RECORD-GCC-SWITCHES %s
538+
// RUN: %clang -### -S --target=x86_64-unknown-linux -fno-record-command-line %s 2>&1 | FileCheck -check-prefix=CHECK-NO-RECORD-GCC-SWITCHES %s
539+
// RUN: %clang -### -S --target=x86_64-unknown-linux -fno-record-command-line -frecord-command-line %s 2>&1 | FileCheck -check-prefix=CHECK-RECORD-GCC-SWITCHES %s
540+
// RUN: %clang -### -S --target=x86_64-unknown-linux -frecord-command-line -fno-record-command-line %s 2>&1 | FileCheck -check-prefix=CHECK-NO-RECORD-GCC-SWITCHES %s
541541
// Test with a couple examples of non-ELF object file formats
542-
// RUN: %clang -### -S -target x86_64-unknown-macosx -frecord-command-line %s 2>&1 | FileCheck -check-prefix=CHECK-RECORD-GCC-SWITCHES %s
542+
// RUN: %clang -### -S --target=x86_64-unknown-macosx -frecord-command-line %s 2>&1 | FileCheck -check-prefix=CHECK-RECORD-GCC-SWITCHES %s
543543
// RUN: not %clang -### -S --target=x86_64-unknown-windows -frecord-command-line %s 2>&1 | FileCheck -check-prefix=CHECK-RECORD-GCC-SWITCHES-ERROR %s
544544
// CHECK-RECORD-GCC-SWITCHES: "-record-command-line"
545545
// CHECK-NO-RECORD-GCC-SWITCHES-NOT: "-record-command-line"
@@ -553,7 +553,7 @@
553553
// RUN: rm -rf "%t.r/with spaces"
554554
// RUN: mkdir -p "%t.r/with spaces"
555555
// RUN: cp %clang "%t.r/with spaces/clang"
556-
// RUN: "%t.r/with spaces/clang" -### -S -target x86_64-unknown-linux -frecord-gcc-switches %s 2>&1 | FileCheck -check-prefix=CHECK-RECORD-GCC-SWITCHES-ESCAPED %s
556+
// RUN: "%t.r/with spaces/clang" -### -S --target=x86_64-unknown-linux -frecord-gcc-switches %s 2>&1 | FileCheck -check-prefix=CHECK-RECORD-GCC-SWITCHES-ESCAPED %s
557557
// CHECK-RECORD-GCC-SWITCHES-ESCAPED: "-record-command-line" "{{.+}}with\\ spaces{{.+}}"
558558
// Clean up copy of large binary copied into temp directory to avoid bloat.
559559
// RUN: rm -f "%t.r/with spaces/clang" || true
@@ -599,23 +599,23 @@
599599
// CHECK_DISABLE_DIRECT: -fobjc-disable-direct-methods-for-testing
600600
// CHECK_NO_DISABLE_DIRECT-NOT: -fobjc-disable-direct-methods-for-testing
601601

602-
// RUN: %clang -### -S -fjmc -target x86_64-unknown-linux %s 2>&1 | FileCheck -check-prefixes=CHECK_JMC_WARN,CHECK_NOJMC %s
603-
// RUN: %clang -### -S -fjmc -target x86_64-pc-windows-msvc %s 2>&1 | FileCheck -check-prefixes=CHECK_JMC_WARN,CHECK_NOJMC %s
604-
// RUN: %clang -### -S -fjmc -g -target x86_64-pc-windows-msvc %s 2>&1 | FileCheck -check-prefix=CHECK_JMC %s
605-
// RUN: %clang -### -S -fjmc -g -fno-jmc -target x86_64-pc-windows-msvc %s 2>&1 | FileCheck -check-prefix=CHECK_NOJMC %s
606-
// RUN: %clang -### -S -fjmc -g -target x86_64-unknown-linux %s 2>&1 | FileCheck -check-prefix=CHECK_JMC %s
607-
// RUN: %clang -### -S -fjmc -g -fno-jmc -target x86_64-unknown-linux %s 2>&1 | FileCheck -check-prefix=CHECK_NOJMC %s
608-
// RUN: %clang -### -fjmc -g -flto -target x86_64-pc-windows-msvc %s 2>&1 | FileCheck -check-prefix=CHECK_NOJMC_LTO %s
609-
// RUN: %clang -### -fjmc -g -flto -target x86_64-unknown-linux %s 2>&1 | FileCheck -check-prefix=CHECK_JMC_LTO %s
610-
// RUN: %clang -### -fjmc -g -flto -fno-jmc -target x86_64-unknown-linux %s 2>&1 | FileCheck -check-prefix=CHECK_NOJMC_LTO %s
602+
// RUN: %clang -### -S -fjmc --target=x86_64-unknown-linux %s 2>&1 | FileCheck -check-prefixes=CHECK_JMC_WARN,CHECK_NOJMC %s
603+
// RUN: %clang -### -S -fjmc --target=x86_64-pc-windows-msvc %s 2>&1 | FileCheck -check-prefixes=CHECK_JMC_WARN,CHECK_NOJMC %s
604+
// RUN: %clang -### -S -fjmc -g --target=x86_64-pc-windows-msvc %s 2>&1 | FileCheck -check-prefix=CHECK_JMC %s
605+
// RUN: %clang -### -S -fjmc -g -fno-jmc --target=x86_64-pc-windows-msvc %s 2>&1 | FileCheck -check-prefix=CHECK_NOJMC %s
606+
// RUN: %clang -### -S -fjmc -g --target=x86_64-unknown-linux %s 2>&1 | FileCheck -check-prefix=CHECK_JMC %s
607+
// RUN: %clang -### -S -fjmc -g -fno-jmc --target=x86_64-unknown-linux %s 2>&1 | FileCheck -check-prefix=CHECK_NOJMC %s
608+
// RUN: %clang -### -fjmc -g -flto --target=x86_64-pc-windows-msvc %s 2>&1 | FileCheck -check-prefix=CHECK_NOJMC_LTO %s
609+
// RUN: %clang -### -fjmc -g -flto --target=x86_64-unknown-linux %s 2>&1 | FileCheck -check-prefix=CHECK_JMC_LTO %s
610+
// RUN: %clang -### -fjmc -g -flto -fno-jmc --target=x86_64-unknown-linux %s 2>&1 | FileCheck -check-prefix=CHECK_NOJMC_LTO %s
611611
// CHECK_JMC_WARN: -fjmc requires debug info. Use -g or debug options that enable debugger's stepping function; option ignored
612612
// CHECK_JMC_WARN_NOT_ELF: -fjmc works only for ELF; option ignored
613613
// CHECK_NOJMC-NOT: -fjmc
614614
// CHECK_JMC: -fjmc
615615
// CHECK_NOJMC_LTO-NOT: -plugin-opt=-enable-jmc-instrument
616616
// CHECK_JMC_LTO: -plugin-opt=-enable-jmc-instrument
617617

618-
// RUN: %clang -### -fintegrated-objemitter -target x86_64 %s 2>&1 | FileCheck -check-prefix=CHECK-INT-OBJEMITTER %s
618+
// RUN: %clang -### -fintegrated-objemitter --target=x86_64 %s 2>&1 | FileCheck -check-prefix=CHECK-INT-OBJEMITTER %s
619619
// CHECK-INT-OBJEMITTER-NOT: unsupported option '-fintegrated-objemitter' for target
620620
// RUN: not %clang -### -fno-integrated-objemitter --target=x86_64 %s 2>&1 | FileCheck -check-prefix=CHECK-NOINT-OBJEMITTER %s
621621
// CHECK-NOINT-OBJEMITTER: unsupported option '-fno-integrated-objemitter' for target

clang/test/Driver/relax.s

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// REQUIRES: x86-registered-target
2-
// RUN: %clang -### -c -target x86_64-pc-linux -integrated-as -Wa,--mrelax-relocations=no %s 2>&1 | FileCheck %s
2+
// RUN: %clang -### -c --target=x86_64-pc-linux -integrated-as -Wa,--mrelax-relocations=no %s 2>&1 | FileCheck %s
33

44
// CHECK: "-cc1as"
55
// CHECK: "-mrelax-relocations=no"

clang/test/Driver/target-as.s

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// Make sure the -march is passed down to cc1as.
2-
// RUN: %clang -target i386-unknown-freebsd -### -c -integrated-as %s \
2+
// RUN: %clang --target=i386-unknown-freebsd -### -c -integrated-as %s \
33
// RUN: -march=geode 2>&1 | FileCheck -check-prefix=TARGET %s
44
//
55
// TARGET: "-cc1as"

0 commit comments

Comments
 (0)