aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFangrui Song <i@maskray.me>2021-03-04 22:31:05 -0800
committerFangrui Song <i@maskray.me>2021-03-04 22:31:05 -0800
commit087e7ab459e74ad3b33701296ade581cb4c3ba6c (patch)
treeffd5a8f5236fd7b897044585644ad2ff180c88f8
parent6eb5d55c55d176f9baf0c50d915ec4ec798c413b (diff)
downloadllvm-087e7ab459e74ad3b33701296ade581cb4c3ba6c.zip
llvm-087e7ab459e74ad3b33701296ade581cb4c3ba6c.tar.gz
llvm-087e7ab459e74ad3b33701296ade581cb4c3ba6c.tar.bz2
[Driver] Switch Exherbo/Alpine/Arch Linux to /etc/os-release
-rw-r--r--clang/lib/Driver/Distro.cpp10
1 files changed, 1 insertions, 9 deletions
diff --git a/clang/lib/Driver/Distro.cpp b/clang/lib/Driver/Distro.cpp
index ee4fe84..785394e 100644
--- a/clang/lib/Driver/Distro.cpp
+++ b/clang/lib/Driver/Distro.cpp
@@ -39,6 +39,7 @@ static Distro::DistroType DetectOsRelease(llvm::vfs::FileSystem &VFS) {
.Case("fedora", Distro::Fedora)
.Case("gentoo", Distro::Gentoo)
.Case("arch", Distro::ArchLinux)
+ .Case("exherbo", Distro::Exherbo)
// On SLES, /etc/os-release was introduced in SLES 11.
.Case("sles", Distro::OpenSUSE)
.Case("opensuse", Distro::OpenSUSE)
@@ -188,15 +189,6 @@ static Distro::DistroType DetectDistro(llvm::vfs::FileSystem &VFS) {
}
// ...and others.
- if (VFS.exists("/etc/exherbo-release"))
- return Distro::Exherbo;
-
- if (VFS.exists("/etc/alpine-release"))
- return Distro::AlpineLinux;
-
- if (VFS.exists("/etc/arch-release"))
- return Distro::ArchLinux;
-
if (VFS.exists("/etc/gentoo-release"))
return Distro::Gentoo;