Bug 1856663 - Add more chunks for Android mochitest-plain. r=jmaher,taskgraph-reviewe...
[gecko.git] / build / build-clang / allow-unversioned-android.patch
blobafd82bfc259b0db2b4ef8d0bba484b026e38dde6
1 diff --git a/clang/lib/Driver/ToolChain.cpp b/clang/lib/Driver/ToolChain.cpp
2 index 31245964c4ba..dbdccd95bb4f 100644
3 --- a/clang/lib/Driver/ToolChain.cpp
4 +++ b/clang/lib/Driver/ToolChain.cpp
5 @@ -689,7 +689,6 @@ ToolChain::getFallbackAndroidTargetPath(StringRef BaseDir) const {
6 unsigned BestVersion = 0;
8 SmallString<32> TripleDir;
9 - bool UsingUnversionedDir = false;
10 std::error_code EC;
11 for (llvm::vfs::directory_iterator LI = getVFS().dir_begin(BaseDir, EC), LE;
12 !EC && LI != LE; LI = LI.increment(EC)) {
13 @@ -698,14 +697,12 @@ ToolChain::getFallbackAndroidTargetPath(StringRef BaseDir) const {
14 if (DirNameSuffix.consume_front(TripleWithoutLevelStr)) {
15 if (DirNameSuffix.empty() && TripleDir.empty()) {
16 TripleDir = DirName;
17 - UsingUnversionedDir = true;
18 } else {
19 unsigned Version;
20 if (!DirNameSuffix.getAsInteger(10, Version) && Version > BestVersion &&
21 Version < TripleVersion) {
22 BestVersion = Version;
23 TripleDir = DirName;
24 - UsingUnversionedDir = false;
28 @@ -716,8 +713,6 @@ ToolChain::getFallbackAndroidTargetPath(StringRef BaseDir) const {
30 SmallString<128> P(BaseDir);
31 llvm::sys::path::append(P, TripleDir);
32 - if (UsingUnversionedDir)
33 - D.Diag(diag::warn_android_unversioned_fallback) << P << getTripleString();
34 return std::string(P);