[clang] [DTLTO][TEST] Make Clang driver tests more robust (PR #159151)

via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 17 01:50:34 PDT 2025


================
@@ -22,30 +24,32 @@
 /// that a warning is issued for unused -Xthinlto-distributor options.
 // RUN: %clang -flto=thin %s -### -fuse-ld=lld --target=x86_64-linux-gnu \
 // RUN:   -Xthinlto-distributor=a1 -Xthinlto-distributor=a2,a3 2>&1 | \
-// RUN:   FileCheck %s --check-prefix=NODIST --implicit-check-not=distributor \
-// RUN:     --implicit-check-not=remote-compiler
+// RUN: FileCheck %s --check-prefix=NODIST --implicit-check-not=distributor \
+// RUN:   --implicit-check-not=remote-compiler
 
 // NODIST: warning: argument unused during compilation: '-Xthinlto-distributor=a1'
 // NODIST: warning: argument unused during compilation: '-Xthinlto-distributor=a2,a3'
 // NODIST: ld.lld
 
 /// Check the expected arguments are forwarded by default with only
 /// --thinlto-distributor=.
+// RUN: %python %S/filename.py %clang > %t_default.log
 // RUN: %clang -flto=thin %s -### -fuse-ld=lld --target=x86_64-linux-gnu \
-// RUN:   -fthinlto-distributor=d.exe -Werror 2>&1 | \
-// RUN:   FileCheck %s --check-prefix=DEFAULT --implicit-check-not=distributor \
-// RUN:     --implicit-check-not=remote-compiler
+// RUN:   -fthinlto-distributor=d.exe -Werror >>%t_default.log 2>&1
+// RUN: FileCheck %s --input-file=%t_default.log --check-prefix=DEFAULT \
+// RUN:   --implicit-check-not=distributor --implicit-check-not=remote-compiler
 
 // DEFAULT: ld.lld
 // DEFAULT-SAME: "--thinlto-distributor=d.exe"
 // DEFAULT-SAME: "--thinlto-remote-compiler={{[^"]+}}"
----------------
bd1976bris wrote:

Rebasing via the GitHub GUI seems to have dropped this part of the change. We should be capturing and checking: `"--thinlto-remote-compiler={{.*}}[[CLANG]]"` as in the other cases. I don't expect this to cause a build bot breakage as the code we have ended up with here is a revert to the original code that has lived upstream for several weeks previous to the latest round of changes.

https://github.com/llvm/llvm-project/pull/159151


More information about the cfe-commits mailing list