Skip to content

Conversation

@jeaye
Copy link
Contributor

@jeaye jeaye commented Sep 30, 2025

On the happy path, when clang-repl is present, we will invoke it in order to determine if the host supports JIT features. That will return a string containing "true". However, in cases where clang-repl is not present or we fail to invoke it, we previously returned False, which would then trigger a failure with our substring check. This PR updates the function to return "" instead, so the substring check is still valid.

This is related to #157359, where the original change was introduced.

On the happy path, when `clang-repl` is present, we will invoke it in
order to determine if the host supports JIT features. That will return a
string containing "true". However, in cases where `clang-repl` is not
present or we fail to invoke it, we previously returned `False`, which
would then trigger a failure with our substring check. This PR updates
the function to return `""` instead, so the substring check is still
valid.

This is related to llvm#157359,
where the original change was introduced.
@llvmbot llvmbot added the clang Clang issues not falling into any other category label Sep 30, 2025
@llvmbot
Copy link
Member

llvmbot commented Sep 30, 2025

@llvm/pr-subscribers-clang

Author: Jeaye Wilkerson (jeaye)

Changes

On the happy path, when clang-repl is present, we will invoke it in order to determine if the host supports JIT features. That will return a string containing "true". However, in cases where clang-repl is not present or we fail to invoke it, we previously returned False, which would then trigger a failure with our substring check. This PR updates the function to return "" instead, so the substring check is still valid.

This is related to #157359, where the original change was introduced.

@vgvassilev for review.


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

1 Files Affected:

  • (modified) clang/test/lit.cfg.py (+2-2)
diff --git a/clang/test/lit.cfg.py b/clang/test/lit.cfg.py
index 64e2bbad8f3b2..e6c79d7a71b51 100644
--- a/clang/test/lit.cfg.py
+++ b/clang/test/lit.cfg.py
@@ -145,7 +145,7 @@ def run_clang_repl(args):
     clang_repl_exe = lit.util.which("clang-repl", config.clang_tools_dir)
 
     if not clang_repl_exe:
-        return False
+        return ""
 
     try:
         clang_repl_cmd = subprocess.Popen(
@@ -153,7 +153,7 @@ def run_clang_repl(args):
         )
     except OSError:
         print("could not exec clang-repl")
-        return False
+        return ""
 
     clang_repl_out = clang_repl_cmd.stdout.read().decode("ascii")
     clang_repl_cmd.wait()

Copy link
Contributor

@vgvassilev vgvassilev left a comment

Choose a reason for hiding this comment

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

Lgtm!

@vgvassilev vgvassilev merged commit 4e59286 into llvm:main Sep 30, 2025
11 checks passed
mahesh-attarde pushed a commit to mahesh-attarde/llvm-project that referenced this pull request Oct 3, 2025
On the happy path, when `clang-repl` is present, we will invoke it in
order to determine if the host supports JIT features. That will return a
string containing "true". However, in cases where `clang-repl` is not
present or we fail to invoke it, we previously returned `False`, which
would then trigger a failure with our substring check. This PR updates
the function to return `""` instead, so the substring check is still
valid.

This is related to llvm#157359,
where the original change was introduced.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

clang Clang issues not falling into any other category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants