Skip to content

Commit 58e6883

Browse files
authored
[clang] Add support for Debian 14 Forky and Debian 15 Duke (llvm#138460)
Futureproofs our single Debian-specific special case for roughly the next 6 years. See: https://lists.debian.org/debian-devel-announce/2025/01/msg00004.html
1 parent f002f30 commit 58e6883

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

clang/include/clang/Driver/Distro.h

+3-1
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ class Distro {
3939
DebianBullseye,
4040
DebianBookworm,
4141
DebianTrixie,
42+
DebianForky,
43+
DebianDuke,
4244
Exherbo,
4345
RHEL5,
4446
RHEL6,
@@ -129,7 +131,7 @@ class Distro {
129131
bool IsOpenSUSE() const { return DistroVal == OpenSUSE; }
130132

131133
bool IsDebian() const {
132-
return DistroVal >= DebianLenny && DistroVal <= DebianTrixie;
134+
return DistroVal >= DebianLenny && DistroVal <= DebianDuke;
133135
}
134136

135137
bool IsUbuntu() const {

clang/lib/Driver/Distro.cpp

+6
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,10 @@ static Distro::DistroType DetectDistro(llvm::vfs::FileSystem &VFS) {
161161
return Distro::DebianBookworm;
162162
case 13:
163163
return Distro::DebianTrixie;
164+
case 14:
165+
return Distro::DebianForky;
166+
case 15:
167+
return Distro::DebianDuke;
164168
default:
165169
return Distro::UnknownDistro;
166170
}
@@ -174,6 +178,8 @@ static Distro::DistroType DetectDistro(llvm::vfs::FileSystem &VFS) {
174178
.Case("bullseye/sid", Distro::DebianBullseye)
175179
.Case("bookworm/sid", Distro::DebianBookworm)
176180
.Case("trixie/sid", Distro::DebianTrixie)
181+
.Case("forky/sid", Distro::DebianForky)
182+
.Case("duke/sid", Distro::DebianDuke)
177183
.Default(Distro::UnknownDistro);
178184
}
179185

0 commit comments

Comments
 (0)