Skip to content

Commit 087e7ab

Browse files
committed
[Driver] Switch Exherbo/Alpine/Arch Linux to /etc/os-release
1 parent 6eb5d55 commit 087e7ab

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

clang/lib/Driver/Distro.cpp

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ static Distro::DistroType DetectOsRelease(llvm::vfs::FileSystem &VFS) {
3939
.Case("fedora", Distro::Fedora)
4040
.Case("gentoo", Distro::Gentoo)
4141
.Case("arch", Distro::ArchLinux)
42+
.Case("exherbo", Distro::Exherbo)
4243
// On SLES, /etc/os-release was introduced in SLES 11.
4344
.Case("sles", Distro::OpenSUSE)
4445
.Case("opensuse", Distro::OpenSUSE)
@@ -188,15 +189,6 @@ static Distro::DistroType DetectDistro(llvm::vfs::FileSystem &VFS) {
188189
}
189190

190191
// ...and others.
191-
if (VFS.exists("/etc/exherbo-release"))
192-
return Distro::Exherbo;
193-
194-
if (VFS.exists("/etc/alpine-release"))
195-
return Distro::AlpineLinux;
196-
197-
if (VFS.exists("/etc/arch-release"))
198-
return Distro::ArchLinux;
199-
200192
if (VFS.exists("/etc/gentoo-release"))
201193
return Distro::Gentoo;
202194

0 commit comments

Comments
 (0)