|
3 | 3 | /// Check DTLTO options are forwarded to the linker. |
4 | 4 |
|
5 | 5 | /// Check that options are forwarded as expected with --thinlto-distributor=. |
6 | | -// RUN: %python %S/filename.py %clang > %t_forward.log |
| 6 | +// RUN: %python %S/Inputs/dtlto-helper.py %clang %llvm-driver > %t_forward.log |
7 | 7 | // RUN: %clang -flto=thin %s -### -fuse-ld=lld --target=x86_64-linux-gnu \ |
8 | 8 | // RUN: -Xthinlto-distributor=a1 -Xthinlto-distributor=a2,a3 \ |
9 | 9 | // RUN: -fthinlto-distributor=d.exe -Werror >>%t_forward.log 2>&1 |
10 | 10 | // RUN: FileCheck %s --input-file=%t_forward.log --check-prefix=FORWARD |
11 | 11 |
|
12 | | -// FORWARD: filename.py:[[CLANG:.*]] |
13 | | -// FORWARD: ld.lld |
| 12 | +// FORWARD: clang-name:[[CLANG:.*]] |
| 13 | +// FORWARD-NEXT: prepend-arg:[[PREPEND_ARG:.*]] |
| 14 | +// FORWARD: ld.lld |
14 | 15 | // FORWARD-SAME: "--thinlto-distributor=d.exe" |
15 | 16 | // FORWARD-SAME: "--thinlto-remote-compiler={{[^"]*}}[[CLANG]]" |
| 17 | +// FORWARD-SAME: [[PREPEND_ARG]] |
16 | 18 | // FORWARD-SAME: "--thinlto-distributor-arg=a1" |
17 | 19 | // FORWARD-SAME: "--thinlto-distributor-arg=a2" |
18 | 20 | // FORWARD-SAME: "--thinlto-distributor-arg=a3" |
|
30 | 32 |
|
31 | 33 | /// Check the expected arguments are forwarded by default with only |
32 | 34 | /// --thinlto-distributor=. |
33 | | -// RUN: %python %S/filename.py %clang > %t_default.log |
| 35 | +// RUN: %python %S/Inputs/dtlto-helper.py %clang %llvm-driver > %t_default.log |
34 | 36 | // RUN: %clang -flto=thin %s -### -fuse-ld=lld --target=x86_64-linux-gnu \ |
35 | 37 | // RUN: -fthinlto-distributor=d.exe -Werror >>%t_default.log 2>&1 |
36 | 38 | // RUN: FileCheck %s --input-file=%t_default.log --check-prefix=DEFAULT \ |
37 | 39 | // RUN: --implicit-check-not=distributor --implicit-check-not=remote-compiler |
38 | 40 |
|
39 | | -// DEFAULT: filename.py:[[CLANG:.*]] |
40 | | -// DEFAULT: ld.lld |
| 41 | +// DEFAULT: clang-name:[[CLANG:.*]] |
| 42 | +// DEFAULT-NEXT: prepend-arg:[[PREPEND_ARG:.*]] |
| 43 | +// DEFAULT: ld.lld |
41 | 44 | // DEFAULT-SAME: "--thinlto-distributor=d.exe" |
42 | 45 | // DEFAULT-SAME: "--thinlto-remote-compiler={{[^"]*}}[[CLANG]]" |
| 46 | +// DEFAULT-SAME: [[PREPEND_ARG]] |
43 | 47 |
|
44 | 48 | /// Check that nothing is forwarded when the compiler is not in LTO mode, and that |
45 | 49 | /// appropriate unused option warnings are issued. |
46 | | -// RUN: %python %S/filename.py %clang > %t_noflto.log |
47 | 50 | // RUN: %clang %s -### -fuse-ld=lld --target=x86_64-linux-gnu \ |
48 | | -// RUN: -fthinlto-distributor=d.exe >>%t_noflto.log 2>&1 |
49 | | -// RUN: FileCheck %s --input-file=%t_noflto.log --check-prefix=NOFLTO \ |
50 | | -// RUN: --implicit-check-not=distributor --implicit-check-not=remote-compiler |
| 51 | +// RUN: -fthinlto-distributor=d.exe 2>&1 | \ |
| 52 | +// RUN: FileCheck %s --check-prefix=NOFLTO --implicit-check-not=distributor \ |
| 53 | +// RUN: --implicit-check-not=remote-compiler |
51 | 54 |
|
52 | 55 | // NOFLTO: warning: argument unused during compilation: '-fthinlto-distributor=d.exe' |
53 | 56 | // NOFLTO: ld.lld |
0 commit comments