|
6 | 6 | /// Check DTLTO options are forwarded to the linker. |
7 | 7 |
|
8 | 8 | /// Check that options are forwarded as expected with --thinlto-distributor=. |
| 9 | +// RUN: %python %S/filename.py %clang > %t_forward.log |
9 | 10 | // RUN: %clang -flto=thin %s -### --target=x86_64-sie-ps5 \ |
10 | 11 | // RUN: -Xthinlto-distributor=a1 -Xthinlto-distributor=a2,a3 \ |
11 | | -// RUN: -fthinlto-distributor=d.exe -Werror 2>&1 | \ |
12 | | -// RUN: FileCheck %s --check-prefix=FORWARD |
| 12 | +// RUN: -fthinlto-distributor=d.exe -Werror >>%t_forward.log 2>&1 |
| 13 | +// RUN: FileCheck %s --input-file=%t_forward.log --check-prefix=FORWARD |
13 | 14 |
|
| 15 | +// FORWARD: filename.py:[[CLANG:.*]] |
14 | 16 | // FORWARD: prospero-lld |
15 | 17 | // FORWARD-SAME: "--thinlto-distributor=d.exe" |
16 | | -// FORWARD-SAME: "--thinlto-remote-compiler={{.*}}clang{{[^\"]*}}" |
| 18 | +// FORWARD-SAME: "--thinlto-remote-compiler={{.*}}[[CLANG]]" |
17 | 19 | // FORWARD-SAME: "--thinlto-distributor-arg=a1" |
18 | 20 | // FORWARD-SAME: "--thinlto-distributor-arg=a2" |
19 | 21 | // FORWARD-SAME: "--thinlto-distributor-arg=a3" |
|
22 | 24 | /// that a warning is issued for unused -Xthinlto-distributor options. |
23 | 25 | // RUN: %clang -flto=thin %s -### --target=x86_64-sie-ps5 \ |
24 | 26 | // RUN: -Xthinlto-distributor=a1 -Xthinlto-distributor=a2,a3 2>&1 | \ |
25 | | -// RUN: FileCheck %s --check-prefix=NODIST --implicit-check-not=distributor \ |
26 | | -// RUN: --implicit-check-not=remote-compiler |
| 27 | +// RUN: FileCheck %s --check-prefix=NODIST --implicit-check-not=distributor \ |
| 28 | +// RUN: --implicit-check-not=remote-compiler |
27 | 29 |
|
28 | 30 | // NODIST: warning: argument unused during compilation: '-Xthinlto-distributor=a1' |
29 | 31 | // NODIST: warning: argument unused during compilation: '-Xthinlto-distributor=a2,a3' |
30 | 32 | // NODIST: prospero-lld |
31 | 33 |
|
32 | 34 | /// Check the expected arguments are forwarded by default with only |
33 | 35 | /// --thinlto-distributor=. |
| 36 | +// RUN: %python %S/filename.py %clang > %t_default.log |
34 | 37 | // RUN: %clang -flto=thin %s -### --target=x86_64-sie-ps5 \ |
35 | | -// RUN: -fthinlto-distributor=d.exe -Werror 2>&1 | \ |
36 | | -// RUN: FileCheck %s --check-prefix=DEFAULT --implicit-check-not=distributor \ |
37 | | -// RUN: --implicit-check-not=remote-compiler |
| 38 | +// RUN: -fthinlto-distributor=d.exe -Werror >>%t_default.log 2>&1 |
| 39 | +// RUN: FileCheck %s --input-file=%t_default.log --check-prefix=DEFAULT \ |
| 40 | +// RUN: --implicit-check-not=distributor --implicit-check-not=remote-compiler |
38 | 41 |
|
| 42 | +// DEFAULT: filename.py:[[CLANG:.*]] |
39 | 43 | // DEFAULT: prospero-lld |
40 | 44 | // DEFAULT-SAME: "--thinlto-distributor=d.exe" |
41 | | -// DEFAULT-SAME: "--thinlto-remote-compiler={{[^"]+}}" |
| 45 | +// DEFAULT-SAME: "--thinlto-remote-compiler={{.*}}[[CLANG]]" |
42 | 46 |
|
43 | 47 | /// Check that the arguments are forwarded unconditionally even when the |
44 | 48 | /// compiler is not in LTO mode. |
| 49 | +// RUN: %python %S/filename.py %clang > %t_noflto.log |
45 | 50 | // RUN: %clang %s -### --target=x86_64-sie-ps5 \ |
46 | | -// RUN: -fthinlto-distributor=d.exe -Werror 2>&1 | \ |
47 | | -// RUN: FileCheck %s --check-prefix=DEFAULT --implicit-check-not=distributor \ |
48 | | -// RUN: --implicit-check-not=remote-compiler |
| 51 | +// RUN: -fthinlto-distributor=d.exe -Werror >>%t_noflto.log 2>&1 |
| 52 | +// RUN: FileCheck %s --input-file=%t_noflto.log --check-prefix=DEFAULT \ |
| 53 | +// RUN: --implicit-check-not=distributor --implicit-check-not=remote-compiler |
0 commit comments