Skip to content

Commit 4ab573b

Browse files
authored
Allow debian to use LLVM 18 (#394)
No ubuntu 20.04 bundles are produced for LLVM 18, thus the check binding to ubuntu 20.04 fails and complains there are no versions possible. Just going by the ubuntu and debian release timelines debian >=9 should be compatible with ubuntu 18 but >=8 might also work. For now not breaking the existing >=9 check just using 18.04 when LLVM 18 is requested.
1 parent cd138e1 commit 4ab573b

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

toolchain/internal/release_name.bzl

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ def _ubuntu_osname(arch, version, major_llvm_version, llvm_version):
102102
os_name = "linux-gnu-ubuntu-22.04"
103103
elif llvm_version in ["16.0.1"]:
104104
os_name = "linux-gnu-ubuntu-20.04"
105-
elif llvm_version in ["18.1.4", "15.0.6", "15.0.5", "13.0.1"]:
105+
elif llvm_version in ["18.1.8", "18.1.7", "18.1.4", "15.0.6", "15.0.5", "13.0.1"]:
106106
os_name = "linux-gnu-ubuntu-18.04"
107107
elif llvm_version in ["15.0.2"]:
108108
os_name = "unknown-linux-gnu-rhel86"
@@ -163,7 +163,10 @@ def _linux(llvm_version, distname, version, arch):
163163
if version.isdigit():
164164
int_version = int(version)
165165
if int_version == 0 or int_version >= 9:
166-
os_name = _ubuntu_osname(arch, "20.04", major_llvm_version, llvm_version)
166+
if major_llvm_version == 18:
167+
os_name = _ubuntu_osname(arch, "18.04", major_llvm_version, llvm_version)
168+
else:
169+
os_name = _ubuntu_osname(arch, "20.04", major_llvm_version, llvm_version)
167170
elif int_version == 8 and major_llvm_version < 7:
168171
os_name = "linux-gnu-debian8"
169172
elif ((distname == "fedora" and int(version) >= 27) or

0 commit comments

Comments
 (0)