summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Ciesko <jan.ciesko@gmail.com>2021-03-26 15:24:08 -0600
committerGitHub <noreply@github.com>2021-03-26 14:24:08 -0700
commitd606cf93bda29d7024ecb08b9dece8d01369fb87 (patch)
tree47014f025fa64956c2fc57d2ef5b8fa3fd28d738
parentf713ebcb016b7eb3ce4d6400ea7daefc89d755af (diff)
downloadspack-d606cf93bda29d7024ecb08b9dece8d01369fb87.tar.gz
spack-d606cf93bda29d7024ecb08b9dece8d01369fb87.tar.bz2
spack-d606cf93bda29d7024ecb08b9dece8d01369fb87.tar.xz
spack-d606cf93bda29d7024ecb08b9dece8d01369fb87.zip
llvm-amdgpu: Fixes "UnboundLocalError: local variable referenced before assignment" (#22562)
Co-authored-by: Jan Ciesko <jciesko@sandia.gov>
-rw-r--r--var/spack/repos/builtin/packages/llvm-amdgpu/package.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/llvm-amdgpu/package.py b/var/spack/repos/builtin/packages/llvm-amdgpu/package.py
index fa9b21f0fe..3811eee095 100644
--- a/var/spack/repos/builtin/packages/llvm-amdgpu/package.py
+++ b/var/spack/repos/builtin/packages/llvm-amdgpu/package.py
@@ -69,6 +69,7 @@ class LlvmAmdgpu(CMakePackage):
compiler = Executable(self.compiler.cc)
gcc_output = compiler('-print-search-dirs', output=str, error=str)
+ gcc_prefix = ""
for line in gcc_output.splitlines():
if line.startswith("install:"):
# Get path and strip any whitespace