llvm: detect short executable names (#45171)
Also, remove annotations for "ld.lld" and "lldb"
This commit is contained in:
parent
517b7fb0c9
commit
d9033d8dac
@ -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:
|
||||
|
@ -669,21 +669,19 @@ def determine_variants(cls, exes, version_str):
|
||||
# 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")
|
||||
|
Loading…
Reference in New Issue
Block a user