summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/linux-perf/package.py8
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"}