8027584: Disable ccache by default

Sun, 18 Mar 2018 15:15:36 -0700

author
kevinw
date
Sun, 18 Mar 2018 15:15:36 -0700
changeset 2203
28b247535e18
parent 2198
67122a315e79
child 2204
0e87966d7ff1

8027584: Disable ccache by default
Reviewed-by: mduigou, tbell

common/autoconf/basics.m4 file | annotate | diff | comparison | revisions
common/autoconf/build-performance.m4 file | annotate | diff | comparison | revisions
common/autoconf/generated-configure.sh file | annotate | diff | comparison | revisions
common/autoconf/help.m4 file | annotate | diff | comparison | revisions
     1.1 --- a/common/autoconf/basics.m4	Wed Feb 07 10:39:09 2018 -0800
     1.2 +++ b/common/autoconf/basics.m4	Sun Mar 18 15:15:36 2018 -0700
     1.3 @@ -740,12 +740,4 @@
     1.4    else
     1.5      IS_RECONFIGURE=no
     1.6    fi
     1.7 -
     1.8 -  if test -e $SRC_ROOT/build/.hide-configure-performance-hints; then
     1.9 -    HIDE_PERFORMANCE_HINTS=yes
    1.10 -  else
    1.11 -    HIDE_PERFORMANCE_HINTS=no
    1.12 -    # Hide it the next time around...
    1.13 -    $TOUCH $SRC_ROOT/build/.hide-configure-performance-hints > /dev/null 2>&1
    1.14 -  fi
    1.15  ])
     2.1 --- a/common/autoconf/build-performance.m4	Wed Feb 07 10:39:09 2018 -0800
     2.2 +++ b/common/autoconf/build-performance.m4	Sun Mar 18 15:15:36 2018 -0700
     2.3 @@ -160,20 +160,28 @@
     2.4  AC_DEFUN([BPERF_SETUP_CCACHE],
     2.5  [
     2.6    AC_ARG_ENABLE([ccache],
     2.7 -      [AS_HELP_STRING([--disable-ccache],
     2.8 -      [disable using ccache to speed up recompilations @<:@enabled@:>@])],
     2.9 -      [ENABLE_CCACHE=${enable_ccache}], [ENABLE_CCACHE=yes])
    2.10 -  if test "x$ENABLE_CCACHE" = xyes; then
    2.11 +      [AS_HELP_STRING([--enable-ccache],
    2.12 +      [enable using ccache to speed up recompilations @<:@disabled@:>@])])
    2.13 +
    2.14 +  CCACHE=
    2.15 +  AC_MSG_CHECKING([is ccache enabled])
    2.16 +  ENABLE_CCACHE=$enable_ccache
    2.17 +  if test "x$enable_ccache" = xyes; then
    2.18 +    AC_MSG_RESULT([yes])
    2.19      OLD_PATH="$PATH"
    2.20      if test "x$TOOLS_DIR" != x; then
    2.21        PATH=$TOOLS_DIR:$PATH
    2.22      fi
    2.23 -    AC_PATH_PROG(CCACHE, ccache)
    2.24 +    BASIC_REQUIRE_PROG(CCACHE, ccache)
    2.25 +    CCACHE_STATUS="enabled"
    2.26      PATH="$OLD_PATH"
    2.27 +  elif test "x$enable_ccache" = xno; then
    2.28 +    AC_MSG_RESULT([no, explicitly disabled])
    2.29 +  elif test "x$enable_ccache" = x; then
    2.30 +    AC_MSG_RESULT([no])
    2.31    else
    2.32 -    AC_MSG_CHECKING([for ccache])
    2.33 -    AC_MSG_RESULT([explicitly disabled])
    2.34 -    CCACHE=
    2.35 +    AC_MSG_RESULT([unknown])
    2.36 +    AC_MSG_ERROR([--enable-ccache does not accept any parameters])
    2.37    fi
    2.38    AC_SUBST(CCACHE)
    2.39  
    2.40 @@ -185,8 +193,11 @@
    2.41      # When using a non home ccache directory, assume the use is to share ccache files
    2.42      # with other users. Thus change the umask.
    2.43      SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
    2.44 +    if test "x$CCACHE" = x; then
    2.45 +      AC_MSG_WARN([--with-ccache-dir has no meaning when ccache is not enabled])
    2.46 +    fi
    2.47    fi
    2.48 -  CCACHE_FOUND=""
    2.49 +
    2.50    if test "x$CCACHE" != x; then
    2.51      BPERF_SETUP_CCACHE_USAGE
    2.52    fi
    2.53 @@ -195,7 +206,6 @@
    2.54  AC_DEFUN([BPERF_SETUP_CCACHE_USAGE],
    2.55  [
    2.56    if test "x$CCACHE" != x; then
    2.57 -    CCACHE_FOUND="true"
    2.58      # Only use ccache if it is 3.1.4 or later, which supports
    2.59      # precompiled headers.
    2.60      AC_MSG_CHECKING([if ccache supports precompiled headers])
    2.61 @@ -203,6 +213,7 @@
    2.62      if test "x$HAS_GOOD_CCACHE" = x; then
    2.63        AC_MSG_RESULT([no, disabling ccache])
    2.64        CCACHE=
    2.65 +      CCACHE_STATUS="disabled"
    2.66      else
    2.67        AC_MSG_RESULT([yes])
    2.68        AC_MSG_CHECKING([if C-compiler supports ccache precompiled headers])
    2.69 @@ -215,6 +226,7 @@
    2.70        else
    2.71          AC_MSG_RESULT([no, disabling ccaching of precompiled headers])
    2.72          CCACHE=
    2.73 +        CCACHE_STATUS="disabled"
    2.74        fi
    2.75      fi
    2.76    fi
     3.1 --- a/common/autoconf/generated-configure.sh	Wed Feb 07 10:39:09 2018 -0800
     3.2 +++ b/common/autoconf/generated-configure.sh	Sun Mar 18 15:15:36 2018 -0700
     3.3 @@ -1749,8 +1749,8 @@
     3.4    --disable-precompiled-headers
     3.5                            disable using precompiled headers when compiling C++
     3.6                            [enabled]
     3.7 -  --disable-ccache        disable using ccache to speed up recompilations
     3.8 -                          [enabled]
     3.9 +  --enable-ccache         enable using ccache to speed up recompilations
    3.10 +                          [disabled]
    3.11  
    3.12  Optional Packages:
    3.13    --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
    3.14 @@ -3776,7 +3776,7 @@
    3.15  
    3.16  
    3.17  #
    3.18 -# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
    3.19 +# Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
    3.20  # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    3.21  #
    3.22  # This code is free software; you can redistribute it and/or modify it
    3.23 @@ -3912,7 +3912,7 @@
    3.24  #CUSTOM_AUTOCONF_INCLUDE
    3.25  
    3.26  # Do not change or remove the following line, it is needed for consistency checks:
    3.27 -DATE_WHEN_GENERATED=1515659624
    3.28 +DATE_WHEN_GENERATED=1521218818
    3.29  
    3.30  ###############################################################################
    3.31  #
    3.32 @@ -36392,18 +36392,26 @@
    3.33  
    3.34    # Check whether --enable-ccache was given.
    3.35  if test "${enable_ccache+set}" = set; then :
    3.36 -  enableval=$enable_ccache; ENABLE_CCACHE=${enable_ccache}
    3.37 -else
    3.38 -  ENABLE_CCACHE=yes
    3.39 -fi
    3.40 -
    3.41 -  if test "x$ENABLE_CCACHE" = xyes; then
    3.42 +  enableval=$enable_ccache;
    3.43 +fi
    3.44 +
    3.45 +
    3.46 +  CCACHE=
    3.47 +  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
    3.48 +$as_echo_n "checking is ccache enabled... " >&6; }
    3.49 +  ENABLE_CCACHE=$enable_ccache
    3.50 +  if test "x$enable_ccache" = xyes; then
    3.51 +    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
    3.52 +$as_echo "yes" >&6; }
    3.53      OLD_PATH="$PATH"
    3.54      if test "x$TOOLS_DIR" != x; then
    3.55        PATH=$TOOLS_DIR:$PATH
    3.56      fi
    3.57 -    # Extract the first word of "ccache", so it can be a program name with args.
    3.58 -set dummy ccache; ac_word=$2
    3.59 +
    3.60 +  for ac_prog in ccache
    3.61 +do
    3.62 +  # Extract the first word of "$ac_prog", so it can be a program name with args.
    3.63 +set dummy $ac_prog; ac_word=$2
    3.64  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
    3.65  $as_echo_n "checking for $ac_word... " >&6; }
    3.66  if ${ac_cv_path_CCACHE+:} false; then :
    3.67 @@ -36442,13 +36450,34 @@
    3.68  fi
    3.69  
    3.70  
    3.71 +  test -n "$CCACHE" && break
    3.72 +done
    3.73 +
    3.74 +
    3.75 +  if test "x$CCACHE" = x; then
    3.76 +    if test "xccache" = x; then
    3.77 +      PROG_NAME=ccache
    3.78 +    else
    3.79 +      PROG_NAME=ccache
    3.80 +    fi
    3.81 +    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
    3.82 +$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
    3.83 +    as_fn_error $? "Cannot continue" "$LINENO" 5
    3.84 +  fi
    3.85 +
    3.86 +
    3.87 +    CCACHE_STATUS="enabled"
    3.88      PATH="$OLD_PATH"
    3.89 -  else
    3.90 -    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ccache" >&5
    3.91 -$as_echo_n "checking for ccache... " >&6; }
    3.92 -    { $as_echo "$as_me:${as_lineno-$LINENO}: result: explicitly disabled" >&5
    3.93 -$as_echo "explicitly disabled" >&6; }
    3.94 -    CCACHE=
    3.95 +  elif test "x$enable_ccache" = xno; then
    3.96 +    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
    3.97 +$as_echo "no, explicitly disabled" >&6; }
    3.98 +  elif test "x$enable_ccache" = x; then
    3.99 +    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
   3.100 +$as_echo "no" >&6; }
   3.101 +  else
   3.102 +    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
   3.103 +$as_echo "unknown" >&6; }
   3.104 +    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
   3.105    fi
   3.106  
   3.107  
   3.108 @@ -36463,12 +36492,15 @@
   3.109      # When using a non home ccache directory, assume the use is to share ccache files
   3.110      # with other users. Thus change the umask.
   3.111      SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
   3.112 -  fi
   3.113 -  CCACHE_FOUND=""
   3.114 +    if test "x$CCACHE" = x; then
   3.115 +      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
   3.116 +$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
   3.117 +    fi
   3.118 +  fi
   3.119 +
   3.120    if test "x$CCACHE" != x; then
   3.121  
   3.122    if test "x$CCACHE" != x; then
   3.123 -    CCACHE_FOUND="true"
   3.124      # Only use ccache if it is 3.1.4 or later, which supports
   3.125      # precompiled headers.
   3.126      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
   3.127 @@ -36478,6 +36510,7 @@
   3.128        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
   3.129  $as_echo "no, disabling ccache" >&6; }
   3.130        CCACHE=
   3.131 +      CCACHE_STATUS="disabled"
   3.132      else
   3.133        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
   3.134  $as_echo "yes" >&6; }
   3.135 @@ -36510,6 +36543,7 @@
   3.136          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
   3.137  $as_echo "no, disabling ccaching of precompiled headers" >&6; }
   3.138          CCACHE=
   3.139 +        CCACHE_STATUS="disabled"
   3.140        fi
   3.141      fi
   3.142    fi
   3.143 @@ -36586,14 +36620,6 @@
   3.144      IS_RECONFIGURE=no
   3.145    fi
   3.146  
   3.147 -  if test -e $SRC_ROOT/build/.hide-configure-performance-hints; then
   3.148 -    HIDE_PERFORMANCE_HINTS=yes
   3.149 -  else
   3.150 -    HIDE_PERFORMANCE_HINTS=no
   3.151 -    # Hide it the next time around...
   3.152 -    $TOUCH $SRC_ROOT/build/.hide-configure-performance-hints > /dev/null 2>&1
   3.153 -  fi
   3.154 -
   3.155  
   3.156  # At the end, call the custom hook. (Dummy macro if no custom sources available)
   3.157  
   3.158 @@ -37896,22 +37922,6 @@
   3.159  
   3.160    # Finally output some useful information to the user
   3.161  
   3.162 -  if test "x$CCACHE_FOUND" != x; then
   3.163 -    if  test "x$HAS_GOOD_CCACHE" = x; then
   3.164 -      CCACHE_STATUS="installed, but disabled (version older than 3.1.4)"
   3.165 -      CCACHE_HELP_MSG="You have ccache installed, but it is a version prior to 3.1.4. Try upgrading."
   3.166 -    else
   3.167 -      CCACHE_STATUS="installed and in use"
   3.168 -    fi
   3.169 -  else
   3.170 -    if test "x$GCC" = xyes; then
   3.171 -      CCACHE_STATUS="not installed (consider installing)"
   3.172 -      CCACHE_HELP_MSG="You do not have ccache installed. Try installing it."
   3.173 -    else
   3.174 -      CCACHE_STATUS="not available for your system"
   3.175 -    fi
   3.176 -  fi
   3.177 -
   3.178    printf "\n"
   3.179    printf "====================================================\n"
   3.180    printf "A new configuration has been successfully created in\n"
   3.181 @@ -37942,46 +37952,11 @@
   3.182    printf "Build performance summary:\n"
   3.183    printf "* Cores to use:   $JOBS\n"
   3.184    printf "* Memory limit:   $MEMORY_SIZE MB\n"
   3.185 -  printf "* ccache status:  $CCACHE_STATUS\n"
   3.186 +  if test "x$CCACHE_STATUS" != "x"; then
   3.187 +    printf "* ccache status:  $CCACHE_STATUS\n"
   3.188 +  fi
   3.189    printf "\n"
   3.190  
   3.191 -  if test "x$CCACHE_HELP_MSG" != x && test "x$HIDE_PERFORMANCE_HINTS" = "xno"; then
   3.192 -    printf "Build performance tip: ccache gives a tremendous speedup for C++ recompilations.\n"
   3.193 -    printf "$CCACHE_HELP_MSG\n"
   3.194 -
   3.195 -  # Print a helpful message on how to acquire the necessary build dependency.
   3.196 -  # ccache is the help tag: freetype, cups, pulse, alsa etc
   3.197 -  MISSING_DEPENDENCY=ccache
   3.198 -
   3.199 -  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
   3.200 -    cygwin_help $MISSING_DEPENDENCY
   3.201 -  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
   3.202 -    msys_help $MISSING_DEPENDENCY
   3.203 -  else
   3.204 -    PKGHANDLER_COMMAND=
   3.205 -
   3.206 -    case $PKGHANDLER in
   3.207 -      apt-get)
   3.208 -        apt_help     $MISSING_DEPENDENCY ;;
   3.209 -      yum)
   3.210 -        yum_help     $MISSING_DEPENDENCY ;;
   3.211 -      port)
   3.212 -        port_help    $MISSING_DEPENDENCY ;;
   3.213 -      pkgutil)
   3.214 -        pkgutil_help $MISSING_DEPENDENCY ;;
   3.215 -      pkgadd)
   3.216 -        pkgadd_help  $MISSING_DEPENDENCY ;;
   3.217 -    esac
   3.218 -
   3.219 -    if test "x$PKGHANDLER_COMMAND" != x; then
   3.220 -      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
   3.221 -    fi
   3.222 -  fi
   3.223 -
   3.224 -    printf "$HELP_MSG\n"
   3.225 -    printf "\n"
   3.226 -  fi
   3.227 -
   3.228    if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
   3.229      printf "NOTE: You have requested to build more than one version of the JVM, which\n"
   3.230      printf "will result in longer build times.\n"
     4.1 --- a/common/autoconf/help.m4	Wed Feb 07 10:39:09 2018 -0800
     4.2 +++ b/common/autoconf/help.m4	Sun Mar 18 15:15:36 2018 -0700
     4.3 @@ -155,22 +155,6 @@
     4.4  [
     4.5    # Finally output some useful information to the user
     4.6  
     4.7 -  if test "x$CCACHE_FOUND" != x; then
     4.8 -    if  test "x$HAS_GOOD_CCACHE" = x; then
     4.9 -      CCACHE_STATUS="installed, but disabled (version older than 3.1.4)"
    4.10 -      CCACHE_HELP_MSG="You have ccache installed, but it is a version prior to 3.1.4. Try upgrading."
    4.11 -    else
    4.12 -      CCACHE_STATUS="installed and in use"
    4.13 -    fi
    4.14 -  else
    4.15 -    if test "x$GCC" = xyes; then
    4.16 -      CCACHE_STATUS="not installed (consider installing)"
    4.17 -      CCACHE_HELP_MSG="You do not have ccache installed. Try installing it."
    4.18 -    else
    4.19 -      CCACHE_STATUS="not available for your system"
    4.20 -    fi
    4.21 -  fi
    4.22 -
    4.23    printf "\n"
    4.24    printf "====================================================\n"
    4.25    printf "A new configuration has been successfully created in\n"
    4.26 @@ -201,17 +185,11 @@
    4.27    printf "Build performance summary:\n"
    4.28    printf "* Cores to use:   $JOBS\n"
    4.29    printf "* Memory limit:   $MEMORY_SIZE MB\n"
    4.30 -  printf "* ccache status:  $CCACHE_STATUS\n"
    4.31 +  if test "x$CCACHE_STATUS" != "x"; then
    4.32 +    printf "* ccache status:  $CCACHE_STATUS\n"
    4.33 +  fi
    4.34    printf "\n"
    4.35  
    4.36 -  if test "x$CCACHE_HELP_MSG" != x && test "x$HIDE_PERFORMANCE_HINTS" = "xno"; then
    4.37 -    printf "Build performance tip: ccache gives a tremendous speedup for C++ recompilations.\n"
    4.38 -    printf "$CCACHE_HELP_MSG\n"
    4.39 -    HELP_MSG_MISSING_DEPENDENCY([ccache])
    4.40 -    printf "$HELP_MSG\n"
    4.41 -    printf "\n"
    4.42 -  fi
    4.43 -
    4.44    if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
    4.45      printf "NOTE: You have requested to build more than one version of the JVM, which\n"
    4.46      printf "will result in longer build times.\n"

mercurial