|
2 | 2 |
|
3 | 3 | /// Check DTLTO options are forwarded to the linker. |
4 | 4 |
|
5 | | -/// Create a response file to check that explicitly specified -Xthinlto-distributor |
6 | | -/// options are forwarded correctly. |
7 | | -// RUN: echo "-flto=thin \"%/s\" -### -fuse-ld=lld --target=x86_64-linux-gnu \ |
8 | | -// RUN: -Xthinlto-distributor=a1 \ |
9 | | -// RUN: -Xthinlto-distributor=a2,a3" > %t_l1.rsp |
10 | | - |
11 | 5 | /// Check that options are forwarded as expected with --thinlto-distributor=. |
12 | | -// RUN: %clang @%t_l1.rsp -fthinlto-distributor=d.exe -Werror 2>&1 | \ |
| 6 | +// RUN: %clang -flto=thin %s -### -fuse-ld=lld --target=x86_64-linux-gnu \ |
| 7 | +// RUN: -Xthinlto-distributor=a1 -Xthinlto-distributor=a2,a3 \ |
| 8 | +// RUN: -fthinlto-distributor=d.exe -Werror 2>&1 | \ |
13 | 9 | // RUN: FileCheck %s --check-prefix=FORWARD |
14 | 10 |
|
15 | 11 | // FORWARD: ld.lld |
|
21 | 17 |
|
22 | 18 | /// Check that options are not added without --thinlto-distributor= and |
23 | 19 | /// that a warning is issued for unused -Xthinlto-distributor options. |
24 | | -// RUN: %clang @%t_l1.rsp 2>&1 | \ |
| 20 | +// RUN: %clang -flto=thin %s -### -fuse-ld=lld --target=x86_64-linux-gnu \ |
| 21 | +// RUN: -Xthinlto-distributor=a1 -Xthinlto-distributor=a2,a3 2>&1 | \ |
25 | 22 | // RUN: FileCheck %s --check-prefix=NODIST |
26 | 23 |
|
27 | 24 | // NODIST: warning: argument unused during compilation: '-Xthinlto-distributor=a1' |
28 | 25 | // NODIST: warning: argument unused during compilation: '-Xthinlto-distributor=a2,a3' |
29 | 26 | // NODIST: ld.lld |
30 | 27 |
|
31 | | -/// Create a response file to check the default behavior. |
32 | | -// RUN: echo " \"%/s\" -### -fuse-ld=lld --target=x86_64-linux-gnu \ |
33 | | -// RUN: -fthinlto-distributor=d.exe" > %t_l2.rsp |
34 | | - |
35 | 28 | /// Check the expected arguments are forwarded by default with only |
36 | 29 | /// --thinlto-distributor=. |
37 | | -// RUN: %clang -flto=thin @%t_l2.rsp -Werror 2>&1 | \ |
| 30 | +// RUN: %clang -flto=thin %s -### -fuse-ld=lld --target=x86_64-linux-gnu \ |
| 31 | +// RUN: -fthinlto-distributor=d.exe -Werror 2>&1 | \ |
38 | 32 | // RUN: FileCheck %s --check-prefix=DEFAULT |
39 | 33 |
|
40 | 34 | // DEFAULT: ld.lld |
|
43 | 37 |
|
44 | 38 | /// Check that nothing is forwarded when the compiler is not in LTO mode, and that |
45 | 39 | /// appropriate unused option warnings are issued. |
46 | | -// RUN: %clang @%t_l2.rsp 2>&1 | \ |
| 40 | +// RUN: %clang %s -### -fuse-ld=lld --target=x86_64-linux-gnu \ |
| 41 | +// RUN: -fthinlto-distributor=d.exe 2>&1 | \ |
47 | 42 | // RUN: FileCheck %s --check-prefix=NOFLTO |
48 | 43 |
|
49 | 44 | // NOFLTO: warning: argument unused during compilation: '-fthinlto-distributor=d.exe' |
|
0 commit comments