diff options
-rw-r--r-- | var/spack/repos/builtin/packages/llvm/detection_test.yaml | 1 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/llvm/package.py | 10 |
2 files changed, 4 insertions, 7 deletions
diff --git a/var/spack/repos/builtin/packages/llvm/detection_test.yaml b/var/spack/repos/builtin/packages/llvm/detection_test.yaml index e979a83626..c5bf5aff64 100644 --- a/var/spack/repos/builtin/packages/llvm/detection_test.yaml +++ b/var/spack/repos/builtin/packages/llvm/detection_test.yaml @@ -53,7 +53,6 @@ paths: compilers: c: ".*/bin/clang-8$" cxx: ".*/bin/clang[+][+]-8$" - ld: ".*/bin/ld.lld-8$" - spec: 'llvm@3.9.1+clang~lld~lldb' extra_attributes: diff --git a/var/spack/repos/builtin/packages/llvm/package.py b/var/spack/repos/builtin/packages/llvm/package.py index bcc0ca7557..c6f2000ee6 100644 --- a/var/spack/repos/builtin/packages/llvm/package.py +++ b/var/spack/repos/builtin/packages/llvm/package.py @@ -669,21 +669,19 @@ class Llvm(CMakePackage, CudaPackage, CompilerPackage): # because LLVM has kindly named compilers variants, compilers = ["+clang"], {} lld_found, lldb_found = False, False - for exe in exes: + for exe in sorted(exes, key=len): name = os.path.basename(exe) if "clang++" in name: - compilers["cxx"] = exe + compilers.setdefault("cxx", exe) elif "clang" in name: - compilers["c"] = exe + compilers.setdefault("c", exe) elif "flang" in name: variants.append("+flang") - compilers["fortran"] = exe + compilers.setdefault("fortran", exe) elif "ld.lld" in name: lld_found = True - compilers["ld"] = exe elif "lldb" in name: lldb_found = True - compilers["lldb"] = exe variants.append("+lld" if lld_found else "~lld") variants.append("+lldb" if lldb_found else "~lldb") |