aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRaul Tambre <raul@tambre.ee>2025-05-04 20:55:49 +0300
committerGitHub <noreply@github.com>2025-05-04 20:55:49 +0300
commit58e6883c8b6e571d6bd774645ee2b6348cfed6ba (patch)
treef49e4ac02bdfaa09c9877fe2d5ad6d6f70bc23a8
parentf002f300c5e1f9ce8adf00441b7e879fec36a071 (diff)
downloadllvm-58e6883c8b6e571d6bd774645ee2b6348cfed6ba.zip
llvm-58e6883c8b6e571d6bd774645ee2b6348cfed6ba.tar.gz
llvm-58e6883c8b6e571d6bd774645ee2b6348cfed6ba.tar.bz2
[clang] Add support for Debian 14 Forky and Debian 15 Duke (#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
-rw-r--r--clang/include/clang/Driver/Distro.h4
-rw-r--r--clang/lib/Driver/Distro.cpp6
2 files changed, 9 insertions, 1 deletions
diff --git a/clang/include/clang/Driver/Distro.h b/clang/include/clang/Driver/Distro.h
index 9f27c2b..5c25592 100644
--- a/clang/include/clang/Driver/Distro.h
+++ b/clang/include/clang/Driver/Distro.h
@@ -39,6 +39,8 @@ public:
DebianBullseye,
DebianBookworm,
DebianTrixie,
+ DebianForky,
+ DebianDuke,
Exherbo,
RHEL5,
RHEL6,
@@ -129,7 +131,7 @@ public:
bool IsOpenSUSE() const { return DistroVal == OpenSUSE; }
bool IsDebian() const {
- return DistroVal >= DebianLenny && DistroVal <= DebianTrixie;
+ return DistroVal >= DebianLenny && DistroVal <= DebianDuke;
}
bool IsUbuntu() const {
diff --git a/clang/lib/Driver/Distro.cpp b/clang/lib/Driver/Distro.cpp
index 82c6278..90e5a39 100644
--- a/clang/lib/Driver/Distro.cpp
+++ b/clang/lib/Driver/Distro.cpp
@@ -161,6 +161,10 @@ static Distro::DistroType DetectDistro(llvm::vfs::FileSystem &VFS) {
return Distro::DebianBookworm;
case 13:
return Distro::DebianTrixie;
+ case 14:
+ return Distro::DebianForky;
+ case 15:
+ return Distro::DebianDuke;
default:
return Distro::UnknownDistro;
}
@@ -174,6 +178,8 @@ static Distro::DistroType DetectDistro(llvm::vfs::FileSystem &VFS) {
.Case("bullseye/sid", Distro::DebianBullseye)
.Case("bookworm/sid", Distro::DebianBookworm)
.Case("trixie/sid", Distro::DebianTrixie)
+ .Case("forky/sid", Distro::DebianForky)
+ .Case("duke/sid", Distro::DebianDuke)
.Default(Distro::UnknownDistro);
}