Bug 1081682 - Make --with-ccache use --with-compiler-wrapper under the hood. r=mshal

Also, avoid removing --with-ccache from all subconfigure calls. Only remove it
from NSPR's.
This commit is contained in:
Mike Hommey 2014-10-15 14:47:02 +09:00
parent 07762146fa
commit 4f241ac97b
7 changed files with 35 additions and 47 deletions

1
aclocal.m4 vendored
View File

@ -8,7 +8,6 @@ builtin(include, build/autoconf/acwinpaths.m4)dnl
builtin(include, build/autoconf/hooks.m4)dnl
builtin(include, build/autoconf/config.status.m4)dnl
builtin(include, build/autoconf/toolchain.m4)dnl
builtin(include, build/autoconf/ccache.m4)dnl
builtin(include, build/autoconf/wrapper.m4)dnl
builtin(include, build/autoconf/nspr.m4)dnl
builtin(include, build/autoconf/nspr-build.m4)dnl

View File

@ -1,36 +0,0 @@
dnl This Source Code Form is subject to the terms of the Mozilla Public
dnl License, v. 2.0. If a copy of the MPL was not distributed with this
dnl file, You can obtain one at http://mozilla.org/MPL/2.0/.
dnl ======================================================
dnl = Enable compiling with ccache
dnl ======================================================
AC_DEFUN([MOZ_CHECK_CCACHE],
[
MOZ_ARG_WITH_STRING(ccache,
[ --with-ccache[=path/to/ccache]
Enable compiling with ccache],
CCACHE=$withval, CCACHE="no")
if test "$CCACHE" != "no"; then
if test -z "$CCACHE" -o "$CCACHE" = "yes"; then
CCACHE=
else
if test ! -e "$CCACHE"; then
AC_MSG_ERROR([$CCACHE not found])
fi
fi
MOZ_PATH_PROGS(CCACHE, $CCACHE ccache)
if test -z "$CCACHE" -o "$CCACHE" = ":"; then
AC_MSG_ERROR([ccache not found])
elif test -x "$CCACHE"; then
CC="$CCACHE $CC"
CXX="$CCACHE $CXX"
MOZ_USING_CCACHE=1
else
AC_MSG_ERROR([$CCACHE is not executable])
fi
fi
AC_SUBST(MOZ_USING_CCACHE)
])

View File

@ -197,6 +197,11 @@ AC_DEFUN([MOZ_SUBCONFIGURE_NSPR], [
if test -z "$MOZ_NATIVE_NSPR"; then
ac_configure_args="$_SUBDIR_CONFIG_ARGS --with-dist-prefix=$MOZ_BUILD_ROOT/dist --with-mozilla"
if test -n "$MOZ_USING_CCACHE"; then
# Avoid double prepending ccache by omitting --with-ccache in building NSPR.
ac_configure_args="`echo $ac_configure_args | sed -e 's/--with-ccache[[^ ]]*//'`"
fi
if test -z "$MOZ_DEBUG"; then
ac_configure_args="$ac_configure_args --disable-debug"
else

View File

@ -12,6 +12,36 @@ MOZ_ARG_WITH_STRING(compiler_wrapper,
Enable compiling with wrappers such as distcc and ccache],
COMPILER_WRAPPER=$withval, COMPILER_WRAPPER="no")
MOZ_ARG_WITH_STRING(ccache,
[ --with-ccache[=path/to/ccache]
Enable compiling with ccache],
CCACHE=$withval, CCACHE="no")
if test "$CCACHE" != "no"; then
if test -z "$CCACHE" -o "$CCACHE" = "yes"; then
CCACHE=
else
if test ! -e "$CCACHE"; then
AC_MSG_ERROR([$CCACHE not found])
fi
fi
MOZ_PATH_PROGS(CCACHE, $CCACHE ccache)
if test -z "$CCACHE" -o "$CCACHE" = ":"; then
AC_MSG_ERROR([ccache not found])
elif test -x "$CCACHE"; then
if test "$COMPILER_WRAPPER" != "no"; then
COMPILER_WRAPPER="$CCACHE $COMPILER_WRAPPER"
else
COMPILER_WRAPPER="$CCACHE"
fi
MOZ_USING_CCACHE=1
else
AC_MSG_ERROR([$CCACHE is not executable])
fi
fi
AC_SUBST(MOZ_USING_CCACHE)
if test "$COMPILER_WRAPPER" != "no"; then
case "$target" in
*-mingw*)

View File

@ -7327,8 +7327,6 @@ if test -n "$JS_GC_ZEAL" -o -n "$MOZ_DEBUG"; then
AC_DEFINE(JS_GC_ZEAL)
fi
MOZ_CHECK_CCACHE
dnl ========================================================
dnl = Enable static checking using gcc-dehydra
dnl ========================================================
@ -9192,11 +9190,6 @@ if test "$COMPILE_ENVIRONMENT" -a -z "$LIBXUL_SDK_DIR"; then
export WRAP_LDFLAGS
if test -n "$MOZ_USING_CCACHE"; then
# Avoid double prepending ccache by omitting --with-ccache in building NSPR.
_SUBDIR_CONFIG_ARGS="`echo $_SUBDIR_CONFIG_ARGS | sed -e 's/--with-ccache[[^ ]]*//'`"
fi
MOZ_SUBCONFIGURE_NSPR()
dnl ========================================================

1
js/src/aclocal.m4 vendored
View File

@ -8,7 +8,6 @@ builtin(include, ../../build/autoconf/acwinpaths.m4)dnl
builtin(include, ../../build/autoconf/hooks.m4)dnl
builtin(include, ../../build/autoconf/config.status.m4)dnl
builtin(include, ../../build/autoconf/toolchain.m4)dnl
builtin(include, ../../build/autoconf/ccache.m4)dnl
builtin(include, ../../build/autoconf/wrapper.m4)dnl
builtin(include, ../../build/autoconf/pkg.m4)dnl
builtin(include, ../../build/autoconf/nspr.m4)dnl

View File

@ -3442,8 +3442,6 @@ if test -n "$JS_OOM_BREAKPOINT"; then
AC_DEFINE(JS_OOM_BREAKPOINT)
fi
MOZ_CHECK_CCACHE
dnl ========================================================
dnl = Enable static checking using gcc-dehydra
dnl ========================================================