diff options
author | Bernhard Kaindl <bernhardkaindl7@gmail.com> | 2024-08-07 12:00:00 +0200 |
---|---|---|
committer | Bernhard Kaindl <bernhardkaindl7@gmail.com> | 2024-08-07 13:34:07 +0200 |
commit | 831b4a3e4a9d3f7299a04a16817b0b3fdb4c61d8 (patch) | |
tree | f8401b94fe0f2818f77f227d3bf66deddf2df3a6 /var | |
parent | 6007a77a33156d50999dcfa4d79dce912adf8871 (diff) | |
download | spack-831b4a3e4a9d3f7299a04a16817b0b3fdb4c61d8.tar.gz spack-831b4a3e4a9d3f7299a04a16817b0b3fdb4c61d8.tar.bz2 spack-831b4a3e4a9d3f7299a04a16817b0b3fdb4c61d8.tar.xz spack-831b4a3e4a9d3f7299a04a16817b0b3fdb4c61d8.zip |
linux-perf: If clang is in PATH, pass "CLANG=" + shutil.which("clang")
When clang is installed I get `clang: Permission denied`.
Setting CLANG to the full path of clang fixes this.
Signed-off-by: Bernhard Kaindl <bernhardkaindl7@gmail.com>
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/linux-perf/package.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/linux-perf/package.py b/var/spack/repos/builtin/packages/linux-perf/package.py index afd94f988d..ddbd08224f 100644 --- a/var/spack/repos/builtin/packages/linux-perf/package.py +++ b/var/spack/repos/builtin/packages/linux-perf/package.py @@ -5,6 +5,7 @@ import os.path import re +import shutil from textwrap import dedent import llnl.util.tty as tty @@ -56,6 +57,7 @@ class LinuxPerf(Package): ) variant("jvmti", default=False, description="build jvmti agent") + depends_on("c", type="build") depends_on("gmake", type="build") depends_on("pkgconfig", type="build") depends_on("flex", type="build") @@ -121,6 +123,12 @@ class LinuxPerf(Package): "LIBUNWIND_DIR={}".format(spec["libunwind"].prefix), "NO_SHELLCHECK=1", ] + + # Setup clang if found in the system's or env's PATH: + clang = shutil.which("clang") + if clang: + args.append("CLANG=" + clang) + # Features to check post-install against `perf version --build-options` checks = {"dwarf", "libunwind", "libbfd", "zlib"} |