Lines Matching +full:tests +full:- +full:fedora +full:- +full:clang
1 //===--- Distro.cpp - Linux distribution detection support ------*- C++ -*-===//
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
9 #include "clang/Driver/Distro.h"
10 #include "clang/Basic/LLVM.h"
20 using namespace clang::driver;
21 using namespace clang;
25 VFS.getBufferForFile("/etc/os-release"); in DetectOsRelease()
27 File = VFS.getBufferForFile("/usr/lib/os-release"); in DetectOsRelease()
32 File.get()->getBuffer().split(Lines, "\n"); in DetectOsRelease()
39 .Case("fedora", Distro::Fedora) in DetectOsRelease()
42 // On SLES, /etc/os-release was introduced in SLES 11. in DetectOsRelease()
52 VFS.getBufferForFile("/etc/lsb-release"); in DetectLsbRelease()
57 File.get()->getBuffer().split(Lines, "\n"); in DetectLsbRelease()
98 // Newer freedesktop.org's compilant systemd-based systems in DetectDistro()
99 // should provide /etc/os-release or /usr/lib/os-release. in DetectDistro()
104 // Older systems might provide /etc/lsb-release. in DetectDistro()
109 // Otherwise try some distro-specific quirks for RedHat... in DetectDistro()
111 VFS.getBufferForFile("/etc/redhat-release"); in DetectDistro()
114 StringRef Data = File.get()->getBuffer(); in DetectDistro()
115 if (Data.startswith("Fedora release")) in DetectDistro()
116 return Distro::Fedora; in DetectDistro()
132 StringRef Data = File.get()->getBuffer(); in DetectDistro()
166 File = VFS.getBufferForFile("/etc/SuSE-release"); in DetectDistro()
168 StringRef Data = File.get()->getBuffer(); in DetectDistro()
191 if (VFS.exists("/etc/exherbo-release")) in DetectDistro()
194 if (VFS.exists("/etc/alpine-release")) in DetectDistro()
197 if (VFS.exists("/etc/arch-release")) in DetectDistro()
200 if (VFS.exists("/etc/gentoo-release")) in DetectDistro()
218 // is cross-compiling from BSD or Windows to Linux, and it would be in GetDistro()
219 // meaningless to try to figure out the "distro" of the non-Linux host. in GetDistro()
230 // This is mostly for passing tests which uses llvm::vfs::InMemoryFileSystem, in GetDistro()