diff options
| author | Benjamin Kramer <benny.kra@googlemail.com> | 2015-04-06 12:30:43 +0000 |
|---|---|---|
| committer | Benjamin Kramer <benny.kra@googlemail.com> | 2015-04-06 12:30:43 +0000 |
| commit | 1a8fa8b43197574feeed21986576e39598ccbbf4 (patch) | |
| tree | 5f47ba8bf455635c9f058785c83215be12fd5183 /clang/lib/Driver | |
| parent | f3206d62781509f6e7089bee292cab6ea5a85f8c (diff) | |
| download | bcm5719-llvm-1a8fa8b43197574feeed21986576e39598ccbbf4.tar.gz bcm5719-llvm-1a8fa8b43197574feeed21986576e39598ccbbf4.zip | |
Update our list of distros a bit.
- Debian jessie will be released this month, add the next testing version to the list.
- RHEL7 was released last june.
- Ubuntu utopic was released last october, vivid will follow later this month.
llvm-svn: 234149
Diffstat (limited to 'clang/lib/Driver')
| -rw-r--r-- | clang/lib/Driver/ToolChains.cpp | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/clang/lib/Driver/ToolChains.cpp b/clang/lib/Driver/ToolChains.cpp index 658ffb6d324..02641fb6440 100644 --- a/clang/lib/Driver/ToolChains.cpp +++ b/clang/lib/Driver/ToolChains.cpp @@ -2860,10 +2860,12 @@ enum Distro { DebianSqueeze, DebianWheezy, DebianJessie, + DebianStretch, Exherbo, RHEL4, RHEL5, RHEL6, + RHEL7, Fedora, OpenSUSE, UbuntuHardy, @@ -2879,11 +2881,13 @@ enum Distro { UbuntuRaring, UbuntuSaucy, UbuntuTrusty, + UbuntuUtopic, + UbuntuVivid, UnknownDistro }; static bool IsRedhat(enum Distro Distro) { - return Distro == Fedora || (Distro >= RHEL4 && Distro <= RHEL6); + return Distro == Fedora || (Distro >= RHEL4 && Distro <= RHEL7); } static bool IsOpenSUSE(enum Distro Distro) { @@ -2891,11 +2895,11 @@ static bool IsOpenSUSE(enum Distro Distro) { } static bool IsDebian(enum Distro Distro) { - return Distro >= DebianLenny && Distro <= DebianJessie; + return Distro >= DebianLenny && Distro <= DebianStretch; } static bool IsUbuntu(enum Distro Distro) { - return Distro >= UbuntuHardy && Distro <= UbuntuTrusty; + return Distro >= UbuntuHardy && Distro <= UbuntuVivid; } static Distro DetectDistro(llvm::Triple::ArchType Arch) { @@ -2922,6 +2926,8 @@ static Distro DetectDistro(llvm::Triple::ArchType Arch) { .Case("raring", UbuntuRaring) .Case("saucy", UbuntuSaucy) .Case("trusty", UbuntuTrusty) + .Case("utopic", UbuntuUtopic) + .Case("vivid", UbuntuVivid) .Default(UnknownDistro); return Version; } @@ -2933,7 +2939,9 @@ static Distro DetectDistro(llvm::Triple::ArchType Arch) { return Fedora; if (Data.startswith("Red Hat Enterprise Linux") || Data.startswith("CentOS")) { - if (Data.find("release 6") != StringRef::npos) + if (Data.find("release 7") != StringRef::npos) + return RHEL7; + else if (Data.find("release 6") != StringRef::npos) return RHEL6; else if (Data.find("release 5") != StringRef::npos) return RHEL5; @@ -2954,6 +2962,8 @@ static Distro DetectDistro(llvm::Triple::ArchType Arch) { return DebianWheezy; else if (Data.startswith("jessie/sid") || Data[0] == '8') return DebianJessie; + else if (Data.startswith("stretch/sid") || Data[0] == '9') + return DebianStretch; return UnknownDistro; } @@ -3150,8 +3160,7 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args) if (IsRedhat(Distro)) ExtraOpts.push_back("--no-add-needed"); - if (Distro == DebianSqueeze || Distro == DebianWheezy || - Distro == DebianJessie || IsOpenSUSE(Distro) || + if ((IsDebian(Distro) && Distro >= DebianSqueeze) || IsOpenSUSE(Distro) || (IsRedhat(Distro) && Distro != RHEL4 && Distro != RHEL5) || (IsUbuntu(Distro) && Distro >= UbuntuKarmic)) ExtraOpts.push_back("--build-id"); |

