Bug 1479851: Update Windows clang to r338614 (8.0.0) r=froydnj
authorDavid Major <dmajor@mozilla.com>
Wed, 01 Aug 2018 17:58:35 -0400
changeset 825649 90eb11dc5e8f052799ed9da9cea51060e5af203b
parent 825648 6175bdb411f5f6c53395d3ae24a691eab52b59ef
child 825650 2011dae40293da2aceba942e8c7d95d0a4dfffbf
push id118150
push usermaglione.k@gmail.com
push dateThu, 02 Aug 2018 04:47:08 +0000
reviewersfroydnj
bugs1479851
milestone63.0a1
Bug 1479851: Update Windows clang to r338614 (8.0.0) r=froydnj
build/build-clang/bug38105.patch
build/build-clang/bug38139.patch
build/build-clang/clang-win64.json
deleted file mode 100644
--- a/build/build-clang/bug38105.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-ThinLTO build fix from https://bugs.llvm.org/show_bug.cgi?id=38105#c4 and https://reviews.llvm.org/D49138
-
---- a/llvm/include/llvm/LTO/LTO.h
-+++ b/llvm/include/llvm/LTO/LTO.h
-@@ -365,7 +365,7 @@
-
-   void addModuleToGlobalRes(ArrayRef<InputFile::Symbol> Syms,
-                             ArrayRef<SymbolResolution> Res, unsigned Partition,
--                            bool InSummary);
-+                            bool InSummary, const Triple &TT);
-
-   // These functions take a range of symbol resolutions [ResI, ResE) and consume
-   // the resolutions used by a single input module by incrementing ResI. After
---- a/llvm/lib/LTO/LTO.cpp
-+++ b/llvm/lib/LTO/LTO.cpp
-@@ -420,7 +420,8 @@
- // their partitions.
- void LTO::addModuleToGlobalRes(ArrayRef<InputFile::Symbol> Syms,
-                                ArrayRef<SymbolResolution> Res,
--                               unsigned Partition, bool InSummary) {
-+                               unsigned Partition, bool InSummary,
-+                               const Triple &TT) {
-   auto *ResI = Res.begin();
-   auto *ResE = Res.end();
-   (void)ResE;
-@@ -428,7 +429,13 @@
-     assert(ResI != ResE);
-     SymbolResolution Res = *ResI++;
-
--    auto &GlobalRes = GlobalResolutions[Sym.getName()];
-+    StringRef Name = Sym.getName();
-+    // Strip the __imp_ prefix from COFF dllimport symbols (similar to the
-+    // way they are handled by lld), otherwise we can end up with two
-+    // global resolutions (one with and one for a copy of the symbol without).
-+    if (TT.isOSBinFormatCOFF() && Name.startswith("__imp_"))
-+      Name = Name.substr(strlen("__imp_"));
-+    auto &GlobalRes = GlobalResolutions[Name];
-     GlobalRes.UnnamedAddr &= Sym.isUnnamedAddr();
-     if (Res.Prevailing) {
-       assert(!GlobalRes.Prevailing &&
-@@ -518,7 +525,7 @@
-   auto ModSyms = Input.module_symbols(ModI);
-   addModuleToGlobalRes(ModSyms, {ResI, ResE},
-                        LTOInfo->IsThinLTO ? ThinLTO.ModuleMap.size() + 1 : 0,
--                       LTOInfo->HasSummary);
-+                       LTOInfo->HasSummary, Triple(Input.getTargetTriple()));
-
-   if (LTOInfo->IsThinLTO)
-     return addThinLTO(BM, ModSyms, ResI, ResE);
deleted file mode 100644
--- a/build/build-clang/bug38139.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-ThinLTO build fix from https://bugs.llvm.org/show_bug.cgi?id=38139#c5
-
-diff --git a/llvm/lib/Transforms/IPO/PassManagerBuilder.cpp b/llvm/lib/Transforms/IPO/PassManagerBuilder.cpp
---- a/llvm/lib/Transforms/IPO/PassManagerBuilder.cpp
-+++ b/llvm/lib/Transforms/IPO/PassManagerBuilder.cpp
-@@ -904,6 +904,9 @@
-     legacy::PassManagerBase &PM) {
-   PerformThinLTO = true;
-
-+  if (LibraryInfo)
-+    PM.add(new TargetLibraryInfoWrapperPass(*LibraryInfo));
-+
-   if (VerifyInput)
-     PM.add(createVerifierPass());
-
--- a/build/build-clang/clang-win64.json
+++ b/build/build-clang/clang-win64.json
@@ -1,21 +1,19 @@
 {
-    "llvm_revision": "336407",
+    "llvm_revision": "338614",
     "stages": "3",
     "build_libcxx": false,
     "build_type": "Release",
     "assertions": false,
     "llvm_repo": "https://llvm.org/svn/llvm-project/llvm/trunk",
     "clang_repo": "https://llvm.org/svn/llvm-project/cfe/trunk",
     "lld_repo": "https://llvm.org/svn/llvm-project/lld/trunk",
     "compiler_repo": "https://llvm.org/svn/llvm-project/compiler-rt/trunk",
     "libcxx_repo": "https://llvm.org/svn/llvm-project/libcxx/trunk",
     "python_path": "c:/mozilla-build/python/python.exe",
     "cc": "cl.exe",
     "cxx": "cl.exe",
     "ml": "ml64.exe",
     "patches": [
-      "bug38139.patch",
-      "bug38105.patch",
       "loosen-msvc-detection.patch"
     ]
 }