summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorMassimiliano Culpo <massimiliano.culpo@gmail.com>2024-11-11 13:05:01 +0100
committerGitHub <noreply@github.com>2024-11-11 05:05:01 -0700
commit84d33fccce5d4395091b63a2aa8a1ee61ecbc5af (patch)
treeb20f78f637ab5028239c3743fd918820fc68f9b6 /var
parentc4a5a996a54b0e9385c9311aea0efbe6df00de28 (diff)
downloadspack-84d33fccce5d4395091b63a2aa8a1ee61ecbc5af.tar.gz
spack-84d33fccce5d4395091b63a2aa8a1ee61ecbc5af.tar.bz2
spack-84d33fccce5d4395091b63a2aa8a1ee61ecbc5af.tar.xz
spack-84d33fccce5d4395091b63a2aa8a1ee61ecbc5af.zip
llvm: filter clang-ocl from the executables being probed (#47536)
This filters any selected executable ending with `-ocl` from the list of executables being probed as candidate for external `llvm` installations. I couldn't reproduce the entire issue, but with a simple script: ``` #!/bin/bash touch foo.o echo "clang version 10.0.0-4ubuntu1 " echo "Target: x86_64-pc-linux-gnu" echo "Thread model: posix" echo "InstalledDir: /usr/bin" exit 0 ``` I noticed the executable was still probed: ``` $ spack -d compiler find /tmp/ocl [ ... ] ==> [2024-11-11-08:38:41.933618] '/tmp/ocl/bin/clang-ocl' '--version' ``` and `foo.o` was left in the working directory. With this change, instead the executable is filtered out of the list on which we run `--version`, so `clang-ocl --version` is not run by Spack.
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/llvm/package.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/var/spack/repos/builtin/packages/llvm/package.py b/var/spack/repos/builtin/packages/llvm/package.py
index 208d73f094..0dc66b9503 100644
--- a/var/spack/repos/builtin/packages/llvm/package.py
+++ b/var/spack/repos/builtin/packages/llvm/package.py
@@ -28,7 +28,7 @@ class LlvmDetection(PackageBase):
# Executables like lldb-vscode-X are daemon listening on some port and would hang Spack
# during detection. clang-cl, clang-cpp, etc. are dev tools that we don't need to test
reject = re.compile(
- r"-(vscode|cpp|cl|gpu|tidy|rename|scan-deps|format|refactor|offload|"
+ r"-(vscode|cpp|cl|ocl|gpu|tidy|rename|scan-deps|format|refactor|offload|"
r"check|query|doc|move|extdef|apply|reorder|change-namespace|"
r"include-fixer|import-test|dap|server)"
)