Skip to content

Commit

Permalink
release_names: some cleanup and a fix
Browse files Browse the repository at this point in the history
  • Loading branch information
rrbutani committed Sep 13, 2021
1 parent eb2ef33 commit 94a4975
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions toolchain/tools/llvm_release_name.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,28 +77,26 @@ def _linux(llvm_version):
os_name = "linux-sles%s" % version
elif distname == "ubuntu" and version.startswith("14.04"):
os_name = "linux-gnu-ubuntu-14.04"
elif (distname == "ubuntu" and version.startswith("20.04")) or (distname == "linuxmint" and version.startswith("20")):
elif ((distname == "ubuntu" and version.startswith("20.04")) or
(distname == "linuxmint" and version.startswith("20")) or
(distname == "pop" and version.startswith("20"))):
if major_llvm_version < 11:
# There is no binary packages specifically for 20.04, but those for 18.04 works on
# 20.04
os_name = "linux-gnu-ubuntu-18.04"
else:
# release 11.0.0 started providing packaging for ubuntu 20
os_name = "linux-gnu-ubuntu-20.04"
elif (distname == "ubuntu" and version.startswith("18.04")) or (distname == "linuxmint" and version.startswith("19")):
elif ((distname == "ubuntu" and version.startswith("18.04")) or
(distname == "linuxmint" and version.startswith("19")) or
(distname == "debian" and (version is None or int(version) == 10))):
if major_llvm_version > 10:
# LLVM seems to have stopped providing binary packages for ubuntu 18.04.
os_name = "linux-gnu-ubuntu-16.04"
else:
os_name = "linux-gnu-ubuntu-18.04"

elif (distname == "ubuntu" and version.startswith("20")) or (distname == "pop" and version.startswith("20")):
# use ubuntu 18.04 clang LLVM release for ubuntu 20.04
os_name = "linux-gnu-ubuntu-18.04"
elif distname in ["ubuntu", "manjaro"] or (distname == "linuxmint" and version.startswith("18")):
os_name = "linux-gnu-ubuntu-16.04"
elif distname == "debian" and (version is None or int(version) == 10):
os_name = "linux-gnu-ubuntu-18.04"
elif distname == "debian" and int(version) == 9 and major_llvm_version >= 7:
os_name = "linux-gnu-ubuntu-16.04"
elif distname == "debian" and int(version) == 8 and major_llvm_version < 7:
Expand Down

0 comments on commit 94a4975

Please sign in to comment.