From 01156db838345aa565fd0827de096518ebd68bd3 Mon Sep 17 00:00:00 2001 From: Graham Inggs Date: Wed, 1 Nov 2023 20:59:53 +0100 Subject: [PATCH] [PATCH] Add support of the next Ubuntu (Ubuntu 24.04 - Noble Numbat) Co-authored-by: Sylvestre Ledru Gbp-Pq: Name ubuntu-releases.patch --- clang/include/clang/Driver/Distro.h | 4 +++- clang/lib/Driver/Distro.cpp | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/clang/include/clang/Driver/Distro.h b/clang/include/clang/Driver/Distro.h index 8291f6575a..1404e16868 100644 --- a/clang/include/clang/Driver/Distro.h +++ b/clang/include/clang/Driver/Distro.h @@ -78,6 +78,8 @@ public: UbuntuKinetic, UbuntuLunar, UbuntuMantic, + UbuntuNoble, + UbuntuOracular, UnknownDistro }; @@ -129,7 +131,7 @@ public: } bool IsUbuntu() const { - return DistroVal >= UbuntuHardy && DistroVal <= UbuntuMantic; + return DistroVal >= UbuntuHardy && DistroVal <= UbuntuOracular; } bool IsAlpineLinux() const { return DistroVal == AlpineLinux; } diff --git a/clang/lib/Driver/Distro.cpp b/clang/lib/Driver/Distro.cpp index 6e00875659..690bf5f5b3 100644 --- a/clang/lib/Driver/Distro.cpp +++ b/clang/lib/Driver/Distro.cpp @@ -94,6 +94,8 @@ static Distro::DistroType DetectLsbRelease(llvm::vfs::FileSystem &VFS) { .Case("kinetic", Distro::UbuntuKinetic) .Case("lunar", Distro::UbuntuLunar) .Case("mantic", Distro::UbuntuMantic) + .Case("noble", Distro::UbuntuNoble) + .Case("oracular", Distro::UbuntuOracular) .Default(Distro::UnknownDistro); return Version; } -- 2.30.2