diff options
author | Michal Gorny <mgorny@gentoo.org> | 2018-12-23 15:07:19 +0000 |
---|---|---|
committer | Michal Gorny <mgorny@gentoo.org> | 2018-12-23 15:07:19 +0000 |
commit | f241228a0201cc6eb623370b214cc7921daf67b5 (patch) | |
tree | e66d5bc7cd1599fcc1de92bb12863079acc26a7b /clang/lib/Driver/Distro.cpp | |
parent | 0c07407bb557a5827c73a50be9559298d5526eef (diff) | |
download | bcm5719-llvm-f241228a0201cc6eb623370b214cc7921daf67b5.tar.gz bcm5719-llvm-f241228a0201cc6eb623370b214cc7921daf67b5.zip |
[Distro] Support detecting Gentoo
Add support for distinguishing plain Gentoo distribution, and a unit
test for it. This is going to be used to introduce distro-specific
customizations in the driver code; most notably, it is going to be used
to disable -faddrsig.
Differential Revision: https://reviews.llvm.org/D56024
llvm-svn: 350027
Diffstat (limited to 'clang/lib/Driver/Distro.cpp')
-rw-r--r-- | clang/lib/Driver/Distro.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/Driver/Distro.cpp b/clang/lib/Driver/Distro.cpp index eb537c87e75..396d0bee560 100644 --- a/clang/lib/Driver/Distro.cpp +++ b/clang/lib/Driver/Distro.cpp @@ -138,6 +138,9 @@ static Distro::DistroType DetectDistro(llvm::vfs::FileSystem &VFS) { if (VFS.exists("/etc/arch-release")) return Distro::ArchLinux; + if (VFS.exists("/etc/gentoo-release")) + return Distro::Gentoo; + return Distro::UnknownDistro; } |