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>
This commit is contained in:
		| @@ -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 @@ def install(self, spec, prefix): | ||||
|             "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"} | ||||
| 
 | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Bernhard Kaindl
					Bernhard Kaindl