Bug 1487603 - Update llvm-dsymutil to 7rc2. r=dmajor,firefox-build-system-reviewers
authorMike Hommey <mh+mozilla@glandium.org>
Fri, 31 Aug 2018 13:25:27 +0000
changeset 482649 a9655235ed2c295c1559e0f09bd0566ea441e0d8
parent 482627 cd72be2928eae2b1bf1952a05fa475c1668cc0f4
child 482650 953cfa4e5a85bc7126c1500eb537765e9b785aaa
push id232
push userfmarier@mozilla.com
push dateWed, 05 Sep 2018 20:45:54 +0000
reviewersdmajor, firefox-build-system-reviewers
bugs1487603, 1436208
milestone63.0a1
Bug 1487603 - Update llvm-dsymutil to 7rc2. r=dmajor,firefox-build-system-reviewers Last time it was updated is bug 1436208, and the crashes we patched it for back then has been fixed upstream a few months later. For some reason, they renamed the executable from llvm-dsymutil to dsymutil. Differential Revision: https://phabricator.services.mozilla.com/D4741
build/macosx/cross-mozconfig.common
taskcluster/scripts/misc/build-llvm-dsymutil.sh
--- a/build/macosx/cross-mozconfig.common
+++ b/build/macosx/cross-mozconfig.common
@@ -27,17 +27,17 @@ FLAGS="-target x86_64-apple-darwin11 -B 
 export CC="$topsrcdir/clang/bin/clang $FLAGS"
 export CXX="$topsrcdir/clang/bin/clang++ $FLAGS"
 export CPP="$topsrcdir/clang/bin/clang $FLAGS -E"
 export LLVMCONFIG=$topsrcdir/clang/bin/llvm-config
 export LDFLAGS="-Wl,-syslibroot,$CROSS_SYSROOT -Wl,-dead_strip"
 export BINDGEN_CFLAGS="$FLAGS"
 export TOOLCHAIN_PREFIX=$CROSS_CCTOOLS_PATH/bin/x86_64-apple-darwin11-
 export DSYMUTIL=$topsrcdir/build/macosx/llvm-dsymutil
-mk_add_options "export REAL_DSYMUTIL=$topsrcdir/llvm-dsymutil/bin/llvm-dsymutil"
+mk_add_options "export REAL_DSYMUTIL=$topsrcdir/llvm-dsymutil/bin/dsymutil"
 export MKFSHFS=$topsrcdir/hfsplus-tools/newfs_hfs
 export DMG_TOOL=$topsrcdir/dmg/dmg
 export HFS_TOOL=$topsrcdir/dmg/hfsplus
 
 export HOST_CC="$topsrcdir/clang/bin/clang"
 export HOST_CXX="$topsrcdir/clang/bin/clang++"
 export HOST_CPP="$topsrcdir/clang/bin/clang -E"
 export HOST_CFLAGS="-g"
--- a/taskcluster/scripts/misc/build-llvm-dsymutil.sh
+++ b/taskcluster/scripts/misc/build-llvm-dsymutil.sh
@@ -9,60 +9,28 @@ UPLOAD_DIR=$HOME/artifacts
 
 cd $HOME_DIR/src
 
 . taskcluster/scripts/misc/tooltool-download.sh
 
 git clone -n https://github.com/llvm-mirror/llvm
 
 cd llvm
-git checkout 4727bc748a48e46824eae55a81ae890cd25c3a34
-
-patch -p1 <<'EOF'
-diff --git a/lib/DebugInfo/DWARF/DWARFDie.cpp b/lib/DebugInfo/DWARF/DWARFDie.cpp
-index 17559d2..b08a8d9 100644
---- a/lib/DebugInfo/DWARF/DWARFDie.cpp
-+++ b/lib/DebugInfo/DWARF/DWARFDie.cpp
-@@ -304,20 +304,24 @@ DWARFDie::find(ArrayRef<dwarf::Attribute> Attrs) const {
- 
- Optional<DWARFFormValue>
- DWARFDie::findRecursively(ArrayRef<dwarf::Attribute> Attrs) const {
-   if (!isValid())
-     return None;
-   if (auto Value = find(Attrs))
-     return Value;
-   if (auto Die = getAttributeValueAsReferencedDie(DW_AT_abstract_origin)) {
-+    if (Die.getOffset() == getOffset())
-+      return None;
-     if (auto Value = Die.findRecursively(Attrs))
-       return Value;
-   }
-   if (auto Die = getAttributeValueAsReferencedDie(DW_AT_specification)) {
-+    if (Die.getOffset() == getOffset())
-+      return None;
-     if (auto Value = Die.findRecursively(Attrs))
-       return Value;
-   }
-   return None;
- }
- 
- DWARFDie
- DWARFDie::getAttributeValueAsReferencedDie(dwarf::Attribute Attr) const {
-EOF
+git checkout 9df0977d9409b093156ebbd8e1ac99bc32b9eb39
 
 mkdir build
 cd build
 
 cmake \
   -GNinja \
   -DCMAKE_BUILD_TYPE=Release \
   -DLLVM_TARGETS_TO_BUILD=X86 \
   -DCMAKE_C_COMPILER=$HOME_DIR/src/gcc/bin/gcc \
   ..
 
 export LD_LIBRARY_PATH=$HOME_DIR/src/gcc/lib64
 
-ninja llvm-dsymutil llvm-symbolizer
+ninja dsymutil llvm-symbolizer
 
-tar --xform='s,^,llvm-dsymutil/,' -Jcf llvm-dsymutil.tar.xz bin/llvm-dsymutil bin/llvm-symbolizer
+tar --xform='s,^,llvm-dsymutil/,' -Jcf llvm-dsymutil.tar.xz bin/dsymutil bin/llvm-symbolizer
 
 mkdir -p $UPLOAD_DIR
 cp llvm-dsymutil.tar.xz $UPLOAD_DIR