Skip to content

Commit de3ca15

Browse files
committed
[DTLTO][TEST] Fix the DTLTO Clang driver tests failing on some build bots
Not all builds name the compiler executable clang. For example, the Fuchsia buildbots use llvm as their single toolchain executable name, as they combine everything together in a busybox-style binary. This is currently causing the new ps5-dtlto.c to fail on such build bots. Update the Clang driver tests to simply check that a non-empty path is provided for the --thinlto-remote-compiler argument, rather than hardcoding the executable name. The cross-project tests will verify that the path is valid later. This is the same fix as applied earlier in #148908. However, that fix left a case in the dtlto.c test that was subsequently reflected into the new ps5-dtlto.c test where it caused a failure. Why it doesn't cause a failure in the existing dtlto.c test is a mystery to me - perhaps the substring "clang" is now included in the path to the busybox-style binary, or perhaps that test was disabled for affected buildbots and then not re-enabled? It's clearly a latent issue though so I have also fixed the dtlto.c test in this patch. Should fix the buildbot failures caused by: #158041.
1 parent a134b06 commit de3ca15

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

clang/test/Driver/DTLTO/dtlto.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535

3636
// DEFAULT: ld.lld
3737
// DEFAULT-SAME: "--thinlto-distributor=d.exe"
38-
// DEFAULT-SAME: "--thinlto-remote-compiler={{.*}}clang{{[^\"]*}}"
38+
// DEFAULT-SAME: "--thinlto-remote-compiler={{[^"]+}}"
3939

4040
/// Check that nothing is forwarded when the compiler is not in LTO mode, and that
4141
/// appropriate unused option warnings are issued.

clang/test/Driver/DTLTO/ps5-dtlto.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535

3636
// DEFAULT: prospero-lld
3737
// DEFAULT-SAME: "--thinlto-distributor=d.exe"
38-
// DEFAULT-SAME: "--thinlto-remote-compiler={{.*}}clang{{[^\"]*}}"
38+
// DEFAULT-SAME: "--thinlto-remote-compiler={{[^"]+}}"
3939

4040
/// Check that the arguments are forwarded unconditionally even when the
4141
/// compiler is not in LTO mode.

0 commit comments

Comments
 (0)