Skip to content

[DTLTO][TEST] Fix Clang driver test failing on some build bots #148908

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 15, 2025

Conversation

bd1976bris
Copy link
Collaborator

@bd1976bris bd1976bris commented Jul 15, 2025

Not all builds name the compiler executable clang. For example, the Fuchsia build bots use llvm as their single toolchain executable name, as they combine everything together in a busybox-style binary.

Update the Clang driver test 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 test will verify that the path is valid later.

Should fix #147265.

Not all builds name the compiler executable `clang`. For example,
the Fuchsia build bots use `llvm` as the executable name, as they
combine everything together in a busybot-style binary.

Update the Clang driver test 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 test will
verify that the path is valid later.

Should fix llvm#147265.
@llvmbot llvmbot added clang Clang issues not falling into any other category clang:driver 'clang' and 'clang++' user-facing binaries. Not 'clang-cl' labels Jul 15, 2025
@bd1976bris bd1976bris requested a review from nga888 July 15, 2025 17:46
@llvmbot
Copy link
Member

llvmbot commented Jul 15, 2025

@llvm/pr-subscribers-clang-driver

@llvm/pr-subscribers-clang

Author: bd1976bris (bd1976bris)

Changes

Not all builds name the compiler executable clang. For example, the Fuchsia build bots use llvm as their single toolchain executable name, as they combine everything together in a busybot-style binary.

Update the Clang driver test 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 test will verify that the path is valid later.

Should fix #147265.


Full diff: https://github.com/llvm/llvm-project/pull/148908.diff

1 Files Affected:

  • (modified) clang/test/Driver/DTLTO/dtlto.c (+1-1)
diff --git a/clang/test/Driver/DTLTO/dtlto.c b/clang/test/Driver/DTLTO/dtlto.c
index d72e487e706b2..96795d9a4e6a4 100644
--- a/clang/test/Driver/DTLTO/dtlto.c
+++ b/clang/test/Driver/DTLTO/dtlto.c
@@ -10,7 +10,7 @@
 
 // FORWARD: ld.lld
 // FORWARD-SAME: "--thinlto-distributor=d.exe"
-// FORWARD-SAME: "--thinlto-remote-compiler={{.*}}clang{{[^\"]*}}"
+// FORWARD-SAME: "--thinlto-remote-compiler={{[^"]+}}"
 // FORWARD-SAME: "--thinlto-distributor-arg=a1"
 // FORWARD-SAME: "--thinlto-distributor-arg=a2"
 // FORWARD-SAME: "--thinlto-distributor-arg=a3"

@bd1976bris bd1976bris requested a review from ilovepi July 15, 2025 17:47
Copy link
Collaborator

@nga888 nga888 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@bd1976bris bd1976bris merged commit edfec9c into llvm:main Jul 15, 2025
11 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang:driver 'clang' and 'clang++' user-facing binaries. Not 'clang-cl' clang Clang issues not falling into any other category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants