[clang] [clang] Add support for Debian 14 Forky and Debian 15 Duke (PR #138460)

Raul Tambre via cfe-commits cfe-commits at lists.llvm.org
Sun May 4 09:50:16 PDT 2025


https://github.com/tambry created https://github.com/llvm/llvm-project/pull/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

>From 71ed6486e8036682bda9b0f6bd88277c7d927cb2 Mon Sep 17 00:00:00 2001
From: Raul Tambre <raul at tambre.ee>
Date: Sun, 4 May 2025 19:03:50 +0300
Subject: [PATCH] [clang] Add support for Debian 14 Forky and Debian 15 Duke

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
---
 clang/include/clang/Driver/Distro.h | 4 +++-
 clang/lib/Driver/Distro.cpp         | 6 ++++++
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/clang/include/clang/Driver/Distro.h b/clang/include/clang/Driver/Distro.h
index 9f27c2baaeb47..5c25592e68ade 100644
--- a/clang/include/clang/Driver/Distro.h
+++ b/clang/include/clang/Driver/Distro.h
@@ -39,6 +39,8 @@ class Distro {
     DebianBullseye,
     DebianBookworm,
     DebianTrixie,
+    DebianForky,
+    DebianDuke,
     Exherbo,
     RHEL5,
     RHEL6,
@@ -129,7 +131,7 @@ class Distro {
   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 82c627819d9fc..90e5a390be7eb 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);
   }
 



More information about the cfe-commits mailing list