Bug 1516228 - Use llvm-objdump instead of objdump in old-configure. r=mshal
authorMike Hommey <mh+mozilla@glandium.org>
Thu, 24 Jan 2019 15:40:58 +0000
changeset 455788 94dd43dcc7f2e444b8a1b201a84fb082da8b5dcd
parent 455787 5f7e5c3ca87dcfdea30bfd83c968e656a0022d2f
child 455789 51eeb5a2701f42f1ceaabb930fb4a327bf485bee
push id35458
push usercsabou@mozilla.com
push dateTue, 29 Jan 2019 10:03:06 +0000
treeherdermozilla-central@3c5ec7cfc73a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmshal
bugs1516228
milestone66.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1516228 - Use llvm-objdump instead of objdump in old-configure. r=mshal Depends on D17462 Differential Revision: https://phabricator.services.mozilla.com/D17463
build/autoconf/compiler-opts.m4
moz.configure
--- a/build/autoconf/compiler-opts.m4
+++ b/build/autoconf/compiler-opts.m4
@@ -119,17 +119,17 @@ if test "$GNU_CC" -a "$GCC_USE_GNU_LD" -
         LD_SUPPORTS_ICF,
         [echo 'int foo() {return 42;}' \
               'int bar() {return 42;}' \
               'int main() {return foo() - bar();}' > conftest.${ac_ext}
         # If the linker supports ICF, foo and bar symbols will have
         # the same address
         if AC_TRY_COMMAND([${CC-cc} -o conftest${ac_exeext} $LDFLAGS -Wl,--icf=safe -ffunction-sections conftest.${ac_ext} $LIBS 1>&2]) &&
            test -s conftest${ac_exeext} &&
-           objdump -t conftest${ac_exeext} | awk changequote(<<, >>)'{a[<<$>>6] = <<$>>1} END {if (a["foo"] && (a["foo"] != a["bar"])) { exit 1 }}'changequote([, ]); then
+           $LLVM_OBJDUMP -t conftest${ac_exeext} | awk changequote(<<, >>)'{a[<<$>>6] = <<$>>1} END {if (a["foo"] && (a["foo"] != a["bar"])) { exit 1 }}'changequote([, ]); then
             LD_SUPPORTS_ICF=yes
         else
             LD_SUPPORTS_ICF=no
         fi
         rm -rf conftest*])
     if test "$LD_SUPPORTS_ICF" = yes; then
         _SAVE_LDFLAGS="$LDFLAGS -Wl,--icf=safe"
         LDFLAGS="$LDFLAGS -Wl,--icf=safe -Wl,--print-icf-sections"
--- a/moz.configure
+++ b/moz.configure
@@ -597,18 +597,20 @@ def llvm_objdump(c_compiler, bindgen_con
     if clang:
         out = check_cmd_output(clang, '--print-prog-name=llvm-objdump',
                                onerror=lambda: None)
         if out:
             llvm_objdump = out.rstrip()
     return (llvm_objdump,)
 
 
-check_prog('LLVM_OBJDUMP', llvm_objdump, what='llvm-objdump',
-           when='--enable-compile-environment')
+llvm_objdump = check_prog('LLVM_OBJDUMP', llvm_objdump, what='llvm-objdump',
+                          when='--enable-compile-environment')
+
+add_old_configure_assignment('LLVM_OBJDUMP', llvm_objdump)
 
 
 # Please do not add configure checks from here on.
 
 # Fallthrough to autoconf-based configure
 include('build/moz.configure/old.configure')
 
 # JS Subconfigure.