Bug 1515843 - Remove HOST_AR/HOST_RANLIB. r=ted
authorMike Hommey <mh+mozilla@glandium.org>
Fri, 21 Dec 2018 23:00:17 +0000
changeset 451781 a415ca5d5ffd1c934f1d2d6585535b08d634d2fd
parent 451780 ec095af21520b791fcfdef6c88a90b48abe32762
child 451782 d517c2d33a6090f8815d2377adb6dda55d49a57d
push id35253
push userccoroiu@mozilla.com
push dateSat, 22 Dec 2018 04:12:04 +0000
treeherdermozilla-central@d30b4fd63e17 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersted
bugs1515843
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 1515843 - Remove HOST_AR/HOST_RANLIB. r=ted Now that we're not even building host static libraries, we don't need variables for the tools used to build them. Ironically, we weren't even running HOST_RANLIB. Depends on D15172 Differential Revision: https://phabricator.services.mozilla.com/D15173
build/autoconf/toolchain.m4
js/src/old-configure.in
old-configure.in
python/mozbuild/mozbuild/backend/tup.py
--- a/build/autoconf/toolchain.m4
+++ b/build/autoconf/toolchain.m4
@@ -37,22 +37,16 @@ fi
 AC_SUBST(CLANG_CXX)
 AC_SUBST(CLANG_CL)
 ])
 
 AC_DEFUN([MOZ_CROSS_COMPILER],
 [
 echo "cross compiling from $host to $target"
 
-if test -z "$HOST_AR_FLAGS"; then
-    HOST_AR_FLAGS="$AR_FLAGS"
-fi
-AC_CHECK_PROGS(HOST_RANLIB, $HOST_RANLIB ranlib, ranlib, :)
-AC_CHECK_PROGS(HOST_AR, $HOST_AR ar, ar, :)
-
 dnl AC_CHECK_PROGS manually goes through $PATH, and as such fails to handle
 dnl absolute or relative paths. Relative paths wouldn't work anyways, but
 dnl absolute paths would. Trick AC_CHECK_PROGS into working in that case by
 dnl adding / to PATH. This is temporary until this moves to moz.configure
 dnl (soon).
 _SAVE_PATH=$PATH
 case "${TOOLCHAIN_PREFIX}" in
 /*)
--- a/js/src/old-configure.in
+++ b/js/src/old-configure.in
@@ -82,17 +82,16 @@ case "$target" in
     MOZ_IOS_SDK
     ;;
 esac
 
 dnl ========================================================
 dnl Checks for compilers.
 dnl ========================================================
 
-dnl AR_FLAGS set here so HOST_AR_FLAGS can be set correctly (see bug 538269)
 AR_FLAGS='crs $@'
 
 if test "$COMPILE_ENVIRONMENT"; then
 
 # Note:
 #   In Mozilla, we use the names $target, $host and $build incorrectly, but are
 #   too far gone to back out now. See Bug 475488:
 #     - When we say $target, we mean $host, that is, the system on which
@@ -111,25 +110,16 @@ else
     AC_CHECK_PROGS(AR, ar, :)
     AC_CHECK_PROGS(STRIP, strip, :)
     if test -z "$HOST_CC"; then
         HOST_CC='$(CC)'
     fi
     if test -z "$HOST_CXX"; then
         HOST_CXX='$(CXX)'
     fi
-    if test -z "$HOST_RANLIB"; then
-        HOST_RANLIB='$(RANLIB)'
-    fi
-    if test -z "$HOST_AR"; then
-        HOST_AR='$(AR)'
-    fi
-    if test -z "$HOST_AR_FLAGS"; then
-        HOST_AR_FLAGS='$(AR_FLAGS)'
-    fi
 fi
 
 MOZ_TOOL_VARIABLES
 
 dnl Special win32 checks
 dnl ========================================================
 
 # Target the Windows 8.1 SDK by default
@@ -444,20 +434,17 @@ if test "$GNU_CXX"; then
 fi
 
 dnl ========================================================
 dnl System overrides of the defaults for host
 dnl ========================================================
 case "$host" in
 *mingw*)
     if test -n "$_WIN32_MSVC"; then
-        HOST_AR=lib
-        HOST_AR_FLAGS='-NOLOGO -OUT:$@'
         HOST_CFLAGS="$HOST_CFLAGS -nologo"
-        HOST_RANLIB='echo ranlib'
     else
         HOST_CFLAGS="$HOST_CFLAGS -mwindows"
     fi
     HOST_CFLAGS="$HOST_CFLAGS -DXP_WIN32 -DXP_WIN -DWIN32 -D_WIN32 -D_CRT_SECURE_NO_WARNINGS"
     HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-O2}"
     HOST_BIN_SUFFIX=.exe
 
     case "${host_cpu}" in
@@ -1692,19 +1679,16 @@ AC_SUBST(OS_LIBS)
 
 AC_SUBST(HOST_CC)
 AC_SUBST(HOST_CXX)
 AC_SUBST_LIST(HOST_CFLAGS)
 AC_SUBST_LIST(HOST_CPPFLAGS)
 AC_SUBST_LIST(HOST_CXXFLAGS)
 AC_SUBST(HOST_LDFLAGS)
 AC_SUBST_LIST(HOST_OPTIMIZE_FLAGS)
-AC_SUBST(HOST_AR)
-AC_SUBST(HOST_AR_FLAGS)
-AC_SUBST(HOST_RANLIB)
 AC_SUBST(HOST_BIN_SUFFIX)
 
 AC_SUBST(TARGET_XPCOM_ABI)
 
 AC_SUBST_LIST(DSO_CFLAGS)
 AC_SUBST_LIST(DSO_PIC_CFLAGS)
 AC_SUBST(DSO_LDOPTS)
 AC_SUBST(BIN_SUFFIX)
--- a/old-configure.in
+++ b/old-configure.in
@@ -101,17 +101,16 @@ esac
 AC_SUBST(ANDROID_SOURCE)
 AC_SUBST(ANDROID_PACKAGE_NAME)
 AC_SUBST(OBJCOPY)
 
 dnl ========================================================
 dnl Checks for compilers.
 dnl ========================================================
 
-dnl AR_FLAGS set here so HOST_AR_FLAGS can be set correctly (see bug 538269)
 AR_FLAGS='crs $@'
 
 if test "$COMPILE_ENVIRONMENT"; then
 
 if test "$target" != "$host"; then
     MOZ_CROSS_COMPILER
 else
     AC_PROG_CC
@@ -121,25 +120,16 @@ else
       sleep 2
     esac
     AC_PROG_CXX
     AC_PROG_RANLIB
     MOZ_PATH_PROGS(AS, $AS as, $CC)
     AC_CHECK_PROGS(AR, ar, :)
     AC_CHECK_PROGS(STRIP, strip, :)
     AC_CHECK_PROGS(OTOOL, otool, :)
-    if test -z "$HOST_RANLIB"; then
-        HOST_RANLIB="$RANLIB"
-    fi
-    if test -z "$HOST_AR"; then
-        HOST_AR="$AR"
-    fi
-    if test -z "$HOST_AR_FLAGS"; then
-        HOST_AR_FLAGS="$AR_FLAGS"
-    fi
 fi
 
 if test -n "$MOZ_WINCONSOLE"; then
     AC_DEFINE(MOZ_WINCONSOLE)
 fi
 
 MOZ_TOOL_VARIABLES
 
@@ -560,20 +550,17 @@ if test "$MOZ_DMD"; then
 fi
 
 dnl ========================================================
 dnl System overrides of the defaults for host
 dnl ========================================================
 case "$host" in
 *mingw*)
     if test -n "$_WIN32_MSVC"; then
-        HOST_AR=lib
-        HOST_AR_FLAGS='-NOLOGO -OUT:$@'
         HOST_CFLAGS="$HOST_CFLAGS -nologo"
-        HOST_RANLIB='echo ranlib'
     else
         HOST_CFLAGS="$HOST_CFLAGS -mwindows"
     fi
     HOST_CFLAGS="$HOST_CFLAGS -DXP_WIN32 -DXP_WIN -DWIN32 -D_WIN32 -D_CRT_SECURE_NO_WARNINGS"
     HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-O2}"
     HOST_BIN_SUFFIX=.exe
 
     case "${host_cpu}" in
@@ -3967,19 +3954,16 @@ AC_SUBST(OS_LIBS)
 
 AC_SUBST(HOST_CC)
 AC_SUBST(HOST_CXX)
 AC_SUBST_LIST(HOST_CFLAGS)
 AC_SUBST_LIST(HOST_CPPFLAGS)
 AC_SUBST_LIST(HOST_CXXFLAGS)
 AC_SUBST(HOST_LDFLAGS)
 AC_SUBST_LIST(HOST_OPTIMIZE_FLAGS)
-AC_SUBST(HOST_AR)
-AC_SUBST(HOST_AR_FLAGS)
-AC_SUBST(HOST_RANLIB)
 AC_SUBST(HOST_BIN_SUFFIX)
 
 AC_SUBST(TARGET_XPCOM_ABI)
 AC_SUBST(HAVE_TOOLCHAIN_SUPPORT_MSSSE3)
 AC_SUBST(HAVE_TOOLCHAIN_SUPPORT_MSSE4_1)
 AC_SUBST(HAVE_X86_AVX2)
 AC_SUBST(HAVE_ALTIVEC)
 
--- a/python/mozbuild/mozbuild/backend/tup.py
+++ b/python/mozbuild/mozbuild/backend/tup.py
@@ -509,33 +509,16 @@ class TupBackend(CommonBackend):
             cmd=cmd,
             inputs=inputs,
             extra_inputs=extra_inputs,
             outputs=outputs,
             display='LINK %o'
         )
 
 
-    def _gen_host_library(self, backend_file):
-        objs = backend_file.host_library.objs
-        inputs = objs
-        outputs = [backend_file.host_library.name]
-        cmd = (
-            [backend_file.environment.substs['HOST_AR']] +
-            [backend_file.environment.substs['HOST_AR_FLAGS'].replace('$@', '%o')] +
-            objs
-        )
-        backend_file.rule(
-            cmd=cmd,
-            inputs=inputs,
-            outputs=outputs,
-            display='AR %o'
-        )
-
-
     def _gen_host_programs(self, backend_file):
         for p in backend_file.host_programs:
             self._gen_host_program(backend_file, p)
 
 
     def _gen_host_program(self, backend_file, prog):
         _, _, _, _, extra_libs, _ = self._expand_libs(prog)
         objs = prog.objs
@@ -693,18 +676,17 @@ class TupBackend(CommonBackend):
                 json.dump({'system': sorted(list(self._built_in_addons))}, fh)
 
         for objdir, backend_file in sorted(self._backend_files.items()):
             backend_file.gen_sources_rules([self._installed_files])
             for var, gen_method in ((backend_file.shared_lib, self._gen_shared_library),
                                     (backend_file.static_lib and backend_file.static_lib.no_expand_lib,
                                      self._gen_static_library),
                                     (backend_file.programs, self._gen_programs),
-                                    (backend_file.host_programs, self._gen_host_programs),
-                                    (backend_file.host_library, self._gen_host_library)):
+                                    (backend_file.host_programs, self._gen_host_programs)):
                 if var:
                     backend_file.export_shell()
                     backend_file.export_icecc()
                     gen_method(backend_file)
             for obj in backend_file.delayed_generated_files:
                 self._process_generated_file(backend_file, obj)
             for path, output, output_group in backend_file.delayed_installed_files:
                 backend_file.symlink_rule(path, output=output, output_group=output_group)