changeset 2390:6d250ba17540

Merge
author prr
date Tue, 29 Nov 2016 11:17:08 -0800
parents 9e77806ba96b 2ba99326da3d
children 07c84678828e
files make/CreateHgtipFiles.gmk
diffstat 11 files changed, 184 insertions(+), 135 deletions(-) [+]
line wrap: on
line diff
--- a/.hgignore	Tue Nov 22 11:45:55 2016 -0800
+++ b/.hgignore	Tue Nov 29 11:17:08 2016 -0800
@@ -3,8 +3,7 @@
 ^.idea/
 nbproject/private/
 ^webrev
-^.hgtip
-^.bridge2
+^.src-rev$
 ^.jib/
 .DS_Store
 .metadata/
--- a/.hgtags	Tue Nov 22 11:45:55 2016 -0800
+++ b/.hgtags	Tue Nov 29 11:17:08 2016 -0800
@@ -388,3 +388,4 @@
 1fc62b1c629fb80fdaa639d3b59452a184f0d705 jdk-9+143
 8d337fd6333e28c48aa87880144b840aad82baaf jdk-9+144
 ff98aa9ec9fae991e426ce5926fc9036d25f5562 jdk-9+145
+a22e2671d88f6b22a4aa82e3966986542ed2a381 jdk-9+146
--- a/common/autoconf/flags.m4	Tue Nov 22 11:45:55 2016 -0800
+++ b/common/autoconf/flags.m4	Tue Nov 29 11:17:08 2016 -0800
@@ -311,7 +311,11 @@
       SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=[$]1'
     fi
   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
-    PICFLAG="-KPIC"
+    if test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
+      PICFLAG="-xcode=pic32"
+    else
+      PICFLAG="-KPIC"
+    fi
     C_FLAG_REORDER='-xF'
     CXX_FLAG_REORDER='-xF'
     SHARED_LIBRARY_FLAGS="-G"
@@ -838,7 +842,6 @@
     fastdebug | slowdebug )
       $2CFLAGS_JDK="[$]$2CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
       $2CXXFLAGS_JDK="[$]$2CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
-      JAVAC_FLAGS="$JAVAC_FLAGS -g"
       ;;
     release )
       ;;
@@ -894,12 +897,12 @@
   # Set some additional per-OS defines.
   if test "x$OPENJDK_$1_OS" = xlinux; then
     $2JVM_CFLAGS="[$]$2JVM_CFLAGS -DLINUX"
-    $2JVM_CFLAGS="[$]$2JVM_CFLAGS -pipe -fPIC -fno-rtti -fno-exceptions \
+    $2JVM_CFLAGS="[$]$2JVM_CFLAGS -pipe $PICFLAG -fno-rtti -fno-exceptions \
         -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
   elif test "x$OPENJDK_$1_OS" = xsolaris; then
     $2JVM_CFLAGS="[$]$2JVM_CFLAGS -DSOLARIS"
     $2JVM_CFLAGS="[$]$2JVM_CFLAGS -template=no%extdef -features=no%split_init \
-        -D_Crun_inline_placement -library=%none -KPIC -mt -features=no%except"
+        -D_Crun_inline_placement -library=%none $PICFLAG -mt -features=no%except"
   elif test "x$OPENJDK_$1_OS" = xmacosx; then
     $2COMMON_CCXXFLAGS_JDK="[$]$2COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
     $2JVM_CFLAGS="[$]$2JVM_CFLAGS -D_ALLBSD_SOURCE"
@@ -1310,7 +1313,7 @@
   AC_MSG_CHECKING([if both compilers support "ARG_ARGUMENT"])
   supports=no
   if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
-  
+
   AC_MSG_RESULT([$supports])
   if test "x$supports" = "xyes" ; then
     :
--- a/common/autoconf/generated-configure.sh	Tue Nov 22 11:45:55 2016 -0800
+++ b/common/autoconf/generated-configure.sh	Tue Nov 29 11:17:08 2016 -0800
@@ -5093,7 +5093,7 @@
 #CUSTOM_AUTOCONF_INCLUDE
 
 # Do not change or remove the following line, it is needed for consistency checks:
-DATE_WHEN_GENERATED=1479822431
+DATE_WHEN_GENERATED=1479997904
 
 ###############################################################################
 #
@@ -49103,7 +49103,11 @@
       SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
     fi
   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
-    PICFLAG="-KPIC"
+    if test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
+      PICFLAG="-xcode=pic32"
+    else
+      PICFLAG="-KPIC"
+    fi
     C_FLAG_REORDER='-xF'
     CXX_FLAG_REORDER='-xF'
     SHARED_LIBRARY_FLAGS="-G"
@@ -50022,7 +50026,6 @@
     fastdebug | slowdebug )
       CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
       CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
-      JAVAC_FLAGS="$JAVAC_FLAGS -g"
       ;;
     release )
       ;;
@@ -50078,12 +50081,12 @@
   # Set some additional per-OS defines.
   if test "x$OPENJDK_TARGET_OS" = xlinux; then
     JVM_CFLAGS="$JVM_CFLAGS -DLINUX"
-    JVM_CFLAGS="$JVM_CFLAGS -pipe -fPIC -fno-rtti -fno-exceptions \
+    JVM_CFLAGS="$JVM_CFLAGS -pipe $PICFLAG -fno-rtti -fno-exceptions \
         -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
   elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
     JVM_CFLAGS="$JVM_CFLAGS -DSOLARIS"
     JVM_CFLAGS="$JVM_CFLAGS -template=no%extdef -features=no%split_init \
-        -D_Crun_inline_placement -library=%none -KPIC -mt -features=no%except"
+        -D_Crun_inline_placement -library=%none $PICFLAG -mt -features=no%except"
   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
     JVM_CFLAGS="$JVM_CFLAGS -D_ALLBSD_SOURCE"
@@ -50846,7 +50849,6 @@
     fastdebug | slowdebug )
       OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
       OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
-      JAVAC_FLAGS="$JAVAC_FLAGS -g"
       ;;
     release )
       ;;
@@ -50902,12 +50904,12 @@
   # Set some additional per-OS defines.
   if test "x$OPENJDK_BUILD_OS" = xlinux; then
     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DLINUX"
-    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -pipe -fPIC -fno-rtti -fno-exceptions \
+    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -pipe $PICFLAG -fno-rtti -fno-exceptions \
         -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
   elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSOLARIS"
     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -template=no%extdef -features=no%split_init \
-        -D_Crun_inline_placement -library=%none -KPIC -mt -features=no%except"
+        -D_Crun_inline_placement -library=%none $PICFLAG -mt -features=no%except"
   elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
     OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_ALLBSD_SOURCE"
--- a/make/CreateHgtipFiles.gmk	Tue Nov 22 11:45:55 2016 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,55 +0,0 @@
-#
-# Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.  Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-default: all
-
-include $(SPEC)
-include MakeBase.gmk
-
-define SetupCreateHgtip
-
-  $$(strip $1)/$(HGTIP_FILENAME): FRC
-	$(HG) tip --repository $$(strip $1) --template '{node|short}\n' > $$@.tmp
-	if [ ! -f $$@ ] || [ "`$(CAT) $$@`" != "`$(CAT) $$@.tmp`" ]; then \
-	  $(MV) $$@.tmp $$@ ; \
-	else \
-	  $(RM) $$@.tmp ; \
-	fi
-
-  TARGETS += $$(strip $1)/$(HGTIP_FILENAME)
-
-endef
-
-# Only try to create the tips if finding an actual hg repository. This will be
-# false if building from a source bundle.
-$(foreach r, $(call FindAllReposAbs), \
-  $(if $(wildcard $r/.hg), $(eval $(call SetupCreateHgtip, $r))) \
-)
-
-all: $(TARGETS)
-
-FRC:
-
-.PHONY: all
--- a/make/Images.gmk	Tue Nov 22 11:45:55 2016 -0800
+++ b/make/Images.gmk	Tue Nov 29 11:17:08 2016 -0800
@@ -77,7 +77,7 @@
 define create-info-file
   $(if $(JDK_ARCH_ABI_PROP_NAME), \
     $(call info-file-item, "SUN_ARCH_ABI", "$(JDK_ARCH_ABI_PROP_NAME)"))
-  $(call info-file-item, "SOURCE", "$(strip $(ALL_SOURCE_TIPS))")
+  $(call info-file-item, "SOURCE", "$(strip $(SOURCE_REVISION))")
 endef
 
 # Param 1 - The file containing the MODULES list
@@ -95,12 +95,13 @@
 # Create a variable dependency file common for all release info files.
 INFO_FILE_VARDEPS := $(call DependOnVariable, create-info-file)
 
-ALL_SOURCE_TIPS = $(shell \
-    if [ -f $(SUPPORT_OUTPUTDIR)/source_tips ] ; then \
-      $(CAT) $(SUPPORT_OUTPUTDIR)/source_tips ; \
+SOURCE_REVISION = $(shell \
+    if [ -f $(SOURCE_REVISION_TRACKER) ] ; then \
+      $(CAT) $(SOURCE_REVISION_TRACKER) ; \
     fi)
 
-$(BASE_RELEASE_FILE): $(INFO_FILE_VARDEPS) $(SUPPORT_OUTPUTDIR)/source_tips
+# The SOURCE_REVISION_TRACKER file may not exist. Only depend on it if it does.
+$(BASE_RELEASE_FILE): $(INFO_FILE_VARDEPS) $(wildcard $(SOURCE_REVISION_TRACKER))
 	$(info-file)
 
 ################################################################################
@@ -131,7 +132,7 @@
     $(JLINK_JLI_CLASSES) \
     #
 
-JLINK_JRE_EXTRA_OPTS := --no-man-pages --no-header-files
+JLINK_JRE_EXTRA_OPTS := --no-man-pages --no-header-files --strip-debug
 
 ifeq ($(JLINK_KEEP_PACKAGED_MODULES), true)
   JLINK_JDK_EXTRA_OPTS := --keep-packaged-modules $(JDK_IMAGE_DIR)/jmods
@@ -400,16 +401,6 @@
 JDK_TARGETS += $(COPY_SAMPLES)
 
 ################################################################################
-# jrt-fs.jar
-
-$(eval $(call SetupCopyFiles,COPY_JRTFS_JAR, \
-    SRC := $(SUPPORT_OUTPUTDIR), \
-    DEST := $(JDK_IMAGE_DIR), \
-    FILES := $(SUPPORT_OUTPUTDIR)/jrt-fs.jar))
-
-JDK_TARGETS += $(COPY_JRTFS_JAR)
-
-################################################################################
 # Code coverage data files
 
 ifeq ($(GCOV_ENABLED), true)
--- a/make/JrtfsJar.gmk	Tue Nov 22 11:45:55 2016 -0800
+++ b/make/JrtfsJar.gmk	Tue Nov 29 11:17:08 2016 -0800
@@ -65,7 +65,7 @@
 $(eval $(call SetupJarArchive,BUILD_JRTFS_JAR, \
     DEPENDENCIES := $(BUILD_JRTFS) $(COPY_JIMAGE_SERVICE_PROVIDER), \
     SRCS := $(SUPPORT_OUTPUTDIR)/jrtfs_classes, \
-    JAR := $(SUPPORT_OUTPUTDIR)/jrt-fs.jar, \
+    JAR := $(SUPPORT_OUTPUTDIR)/modules_libs/java.base/jrt-fs.jar, \
     MANIFEST := $(SUPPORT_OUTPUTDIR)/java-main-manifest.mf, \
 ))
 
--- a/make/Main.gmk	Tue Nov 22 11:45:55 2016 -0800
+++ b/make/Main.gmk	Tue Nov 29 11:17:08 2016 -0800
@@ -284,16 +284,11 @@
 ################################################################################
 # Images targets
 
-# Stores the tips for each repository. This file is be used when constructing
-# the jdk image and can be used to track the exact sources used to build that
-# image.
-source-tips: $(SUPPORT_OUTPUTDIR)/source_tips
-$(SUPPORT_OUTPUTDIR)/source_tips: FRC
-	$(call MakeDir, $(@D))
-	$(call GetSourceTips)
+store-source-revision:
+	+($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f SourceRevision.gmk store-source-revision)
 
-create-hgtip-files:
-	+($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f CreateHgtipFiles.gmk)
+create-source-revision-tracker:
+	+($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f SourceRevision.gmk create-source-revision-tracker)
 
 BOOTCYCLE_TARGET := product-images
 bootcycle-images:
@@ -332,7 +327,7 @@
 exploded-image-optimize:
 	+($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f ExplodedImageOptimize.gmk)
 
-ALL_TARGETS += source-tips create-hgtip-files bootcycle-images zip-security \
+ALL_TARGETS += store-source-revision create-source-revision-tracker bootcycle-images zip-security \
     zip-source jrtfs-jar jdk-image jre-image \
     symbols-image profiles mac-bundles-jdk \
     exploded-image-optimize
@@ -608,12 +603,12 @@
 
   jdk.jdeps-gendata: java rmic
 
-  # Declare dependencies between jmod targets. Only java.base jmod needs access
-  # to the other jmods to be built.
+  # Declare dependencies between jmod targets.
+  # java.base jmod needs jrt-fs.jar and access to the other jmods to be built.
   # When creating a BUILDJDK, we don't need to add hashes to java.base, thus
   # we don't need to depend on all other jmods
   ifneq ($(CREATING_BUILDJDK), true)
-    java.base-jmod: $(filter-out java.base-jmod \
+    java.base-jmod: jrtfs-jar $(filter-out java.base-jmod \
         $(addsuffix -jmod, $(call FindAllUpgradeableModules)), $(JMOD_TARGETS))
   endif
 
@@ -684,10 +679,10 @@
     java.base-jmod jdk-image jre-image: generate-link-opt-data
   endif
 
-  jdk-image: jmods zip-source source-tips demos samples jrtfs-jar
-  jre-image: jmods source-tips jrtfs-jar
+  jdk-image: jmods zip-source create-source-revision-tracker demos samples
+  jre-image: jmods create-source-revision-tracker
 
-  profiles: jmods zip-source source-tips jrtfs-jar
+  profiles: jmods zip-source create-source-revision-tracker
 
   mac-bundles-jdk: jdk-image jre-image
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/make/SourceRevision.gmk	Tue Nov 29 11:17:08 2016 -0800
@@ -0,0 +1,131 @@
+#
+# Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.  Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+default: all
+
+include $(SPEC)
+include MakeBase.gmk
+
+################################################################################
+# Keep track of what source revision is used to create the build, by creating
+# a tracker file in the output directory. This tracker file is included in the
+# image, and can be used to recreate the source revision used.
+#
+# We're either building directly from a mercurial forest, and if so, use the
+# current revision from mercurial. Otherwise, we are building from a source
+# bundle. As a part of creating this source bundle, the current mercurial
+# revisions of all repos will be stored in a file in the top dir, which is then
+# used when creating the tracker file.
+
+STORED_SOURCE_REVISION := $(TOPDIR)/.src-rev
+
+# Are we using mercurial?
+ifneq ($(and $(HG), $(wildcard $(TOPDIR)/.hg)), )
+
+  # Verify that the entire forest is consistent
+  $(foreach repo, $(call FindAllReposRel), \
+    $(if $(wildcard $(TOPDIR)/$(repo)/.hg),, \
+        $(error Inconsistent revision control: $(repo) is missing .hg directory)) \
+  )
+
+  # Replace "." with "_top" and "/" with "-"
+  MakeFilenameFromRepo = \
+      $(strip $(subst .,top, $(subst /,-, $1)))
+
+  ################################################################################
+  # SetupGetRevisionForRepo defines a make rule for creating a file containing
+  # the name of the repository and the output of "hg id" for that repository.
+  # Argument 1 is the relative path to the repository from the top dir.
+  #
+  SetupGetRevisionForRepo = $(NamedParamsMacroTemplate)
+  define SetupGetRevisionForRepoBody
+    $1_REPO_PATH :=  $$(TOPDIR)/$$(strip $1)
+    $1_FILENAME := $$(call MakeFilenameFromRepo, $1)
+
+    $$(SUPPORT_OUTPUTDIR)/src-rev/$$($1_FILENAME): FRC
+	$$(call MakeDir, $$(@D))
+	$$(ECHO) $$(strip $1):`$$(HG) id -i --repository $$($1_REPO_PATH)` > $$@
+
+    REPO_REVISIONS += $$(SUPPORT_OUTPUTDIR)/src-rev/$$($1_FILENAME)
+  endef
+
+  # Setup rules for all repos. This makes sure all the "hg id" calls are made
+  # in parallel.
+  $(foreach repo, $(call FindAllReposRel), \
+    $(eval $(call SetupGetRevisionForRepo, $(repo))) \
+  )
+
+  # Create a complete source revision output file from all repos
+  # Param 1: The output file
+  define CreateSourceRevisionFile
+    $1: $$(REPO_REVISIONS)
+	$$(call MakeDir, $$(@D))
+	$$(ECHO) `$$(CAT) $$(REPO_REVISIONS)` > $$@.tmp
+	if [ ! -f $$@ ] || [ "`$$(CAT) $$@`" != "`$$(CAT) $$@.tmp`" ]; then \
+	  $$(MV) $$@.tmp $$@ ; \
+	else \
+	  $$(RM) $$@.tmp ; \
+	fi
+  endef
+
+  $(eval $(call CreateSourceRevisionFile, $(STORED_SOURCE_REVISION)))
+
+  store-source-revision: $(STORED_SOURCE_REVISION)
+
+  $(eval $(call CreateSourceRevisionFile, $(SOURCE_REVISION_TRACKER)))
+
+  create-source-revision-tracker: $(SOURCE_REVISION_TRACKER)
+
+else
+  # Not using HG
+
+  ifneq ($(wildcard $(STORED_SOURCE_REVISION)), )
+    # We have a stored source revision (.src-rev)
+
+    store-source-revision:
+	$(call LogWarn, Warning: No mercurial configuration present, not updating .src-rev)
+
+    $(SOURCE_REVISION_TRACKER): $(STORED_SOURCE_REVISION)
+	$(install-file)
+
+    create-source-revision-tracker: $(SOURCE_REVISION_TRACKER)
+  else
+    # We don't have a stored source revision. Can't do anything, really.
+
+    store-source-revision:
+	$(call LogWarn, Error: No mercurial configuration present, cannot create .src-rev)
+	exit 2
+
+    create-source-revision-tracker:
+	$(call LogWarn, Warning: No mercurial configuration present and no .src-rev)
+  endif
+
+endif
+
+all: store-source-revision create-source-revision-tracker
+
+FRC: # Force target
+
+.PHONY: all store-source-revision create-source-revision-tracker
--- a/make/common/JavaCompilation.gmk	Tue Nov 22 11:45:55 2016 -0800
+++ b/make/common/JavaCompilation.gmk	Tue Nov 29 11:17:08 2016 -0800
@@ -172,6 +172,7 @@
 #   KEEP_DUPS:=Do not remove duplicate file names from different source roots.
 #   FAIL_NO_SRC:=Set to false to not fail the build if no source files are found,
 #        default is true.
+#   DEBUG_SYMBOLS:=Set to false to disable generation of debug symbols.
 SetupJavaCompilation = $(NamedParamsMacroTemplate)
 define SetupJavaCompilationBody
 
@@ -183,7 +184,11 @@
   # Extract the info from the java compiler setup.
   $1_JVM := $$($$($1_SETUP)_JVM)
   $1_JAVAC := $$($$($1_SETUP)_JAVAC)
-  $1_FLAGS := $$($$($1_SETUP)_FLAGS) $$($1_ADD_JAVAC_FLAGS) $(JAVAC_FLAGS)
+  $1_FLAGS :=
+  ifneq ($$($1_DEBUG_SYMBOLS), false)
+    $1_FLAGS := -g
+  endif
+  $1_FLAGS += $$($$($1_SETUP)_FLAGS) $$($1_ADD_JAVAC_FLAGS) $(JAVAC_FLAGS)
   ifneq ($$($1_CLASSPATH), )
     $1_FLAGS += -cp $$(call PathList, $$($1_CLASSPATH))
   endif
--- a/make/common/MakeBase.gmk	Tue Nov 22 11:45:55 2016 -0800
+++ b/make/common/MakeBase.gmk	Tue Nov 29 11:17:08 2016 -0800
@@ -337,44 +337,21 @@
 endif # HAS_FILE_FUNCTION
 
 ################################################################################
-# The source tips can come from the Mercurial repository, or in the files
-# $(HGTIP_FILENAME) which contains the tip but is also positioned in the same
-# directory as the original .hg directory. The hgtip files are created in
-# CreateHgtipFiles.gmk.
-HGTIP_FILENAME := .hgtip
+
+# A file containing a way to uniquely identify the source code revision that
+# the build was created from
+SOURCE_REVISION_TRACKER := $(SUPPORT_OUTPUTDIR)/src-rev/source-revision-tracker
+
+# Locate all hg repositories included in the forest, as absolute paths
 FindAllReposAbs = \
     $(strip $(sort $(dir $(filter-out $(SRC_ROOT)/build/%, $(wildcard \
-        $(addprefix $(SRC_ROOT)/, \
-            .hg */.hg */*/.hg */*/.hg */*/*/.hg \
-            .hgtip */.hgtip */*/.hgtip */*/.hgtip */*/*/.hgtip \
-        ) \
+        $(addprefix $(SRC_ROOT)/, .hg */.hg */*/.hg */*/*/.hg) \
     )))))
 
+# Locate all hg repositories included in the forest, as relative paths
 FindAllReposRel = \
     $(strip $(subst $(SRC_ROOT)/,.,$(patsubst $(SRC_ROOT)/%/, %, $(FindAllReposAbs))))
 
-# Emit the repo:tip pairs to $@, but only if they changed since last time
-define GetSourceTips
-	$(CD) $(SRC_ROOT) ; \
-	for i in $(FindAllReposRel) IGNORE ; do \
-	  if [ "$${i}" = "IGNORE" ] ; then \
-	    continue; \
-	  elif [ -d $${i}/.hg -a "$(HG)" != "" ] ; then \
-	    $(PRINTF) " %s:%s" \
-	        "$${i}" `$(HG) tip --repository $${i} --template '{node|short}\n'` ; \
-	  elif [ -f $${i}/$(HGTIP_FILENAME) ] ; then \
-	    $(PRINTF) " %s:%s" \
-	        "$${i}" `$(CAT) $${i}/$(HGTIP_FILENAME)` ; \
-	  fi; \
-	done > $@.tmp
-	$(PRINTF) "\n" >> $@.tmp
-	if [ ! -f $@ ] || [ "`$(CAT) $@`" != "`$(CAT) $@.tmp`" ]; then \
-	  $(MV) $@.tmp $@ ; \
-	else \
-	  $(RM) $@.tmp ; \
-	fi
-endef
-
 ################################################################################
 
 define SetupLogging