Skip to content

Commit bd4d05f

Browse files
author
Lana Steuck
committed
Merge
2 parents 2a23d58 + fa93c65 commit bd4d05f

19 files changed

+366
-254
lines changed

common/bin/compare.sh

+4-4
Original file line numberDiff line numberDiff line change
@@ -654,10 +654,10 @@ compare_bin_file() {
654654
OTHER_DIZ_FILE="$OTHER/support/native/java.base/java_objs/java.diz"
655655
elif [ "$NAME" = "jimage.exe" ] \
656656
&& [ -f "$OTHER/support/native/jdk.jlink/jimage_objs/jimage.diz" ]; then
657-
OTHER_DIZ_FILE="$OTHER/support/native/jdk.jlink/jimage_objs/jimage.diz"
657+
OTHER_DIZ_FILE="$OTHER/support/modules_cmds/jdk.jlink/jimage.diz"
658658
elif [ "$NAME" = "javacpl.exe" ] \
659659
&& [ -f "$OTHER/support/native/jdk.plugin/javacpl/javacpl.diz" ]; then
660-
OTHER_DIZ_FILE="$OTHER/support/native/jdk.plugin/javacpl/javacpl.diz"
660+
OTHER_DIZ_FILE="$OTHER/support/modules_cmds/jdk.deploy.controlpanel/javacpl.diz"
661661
elif [ -f "${OTHER_FILE_BASE}.diz" ]; then
662662
OTHER_DIZ_FILE=${OTHER_FILE_BASE}.diz
663663
else
@@ -686,10 +686,10 @@ compare_bin_file() {
686686
THIS_DIZ_FILE="$THIS/support/native/java.base/java_objs/java.diz"
687687
elif [ "$NAME" = "jimage.exe" ] \
688688
&& [ -f "$THIS/support/native/jdk.jlink/jimage_objs/jimage.diz" ]; then
689-
THIS_DIZ_FILE="$THIS/support/native/jdk.jlink/jimage_objs/jimage.diz"
689+
THIS_DIZ_FILE="$THIS/support/modules_cmds/jdk.jlink/jimage.diz"
690690
elif [ "$NAME" = "javacpl.exe" ] \
691691
&& [ -f "$THIS/support/native/jdk.plugin/javacpl/javacpl.diz" ]; then
692-
THIS_DIZ_FILE="$THIS/support/native/jdk.plugin/javacpl/javacpl.diz"
692+
THIS_DIZ_FILE="$THIS/support/modules_cmds/jdk.deploy.controlpanel/javacpl.diz"
693693
elif [ -f "${THIS_FILE_BASE}.diz" ]; then
694694
THIS_DIZ_FILE=${THIS_FILE/.dll/}.diz
695695
else

make/CompileJavaModules.gmk

+22-2
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ java.datatransfer_COPY := flavormap.properties
9595
################################################################################
9696

9797
java.desktop_ADD_JAVAC_FLAGS := -Xdoclint:all/protected,-reference \
98-
'-Xdoclint/package:java.*,javax.*' -Xlint:-deprecation
98+
'-Xdoclint/package:java.*,javax.*' -Xlint:-deprecation,-exports
9999
java.desktop_COPY := .gif .png .wav .txt .xml .css .pf
100100
java.desktop_CLEAN := iio-plugin.properties cursors.properties
101101

@@ -316,7 +316,7 @@ java.xml.ws_CLEAN := .properties
316316

317317
################################################################################
318318

319-
java.naming_ADD_JAVAC_FLAGS := -Xdoclint:all/protected '-Xdoclint/package:java.*,javax.*'
319+
java.naming_ADD_JAVAC_FLAGS := -Xdoclint:all/protected '-Xdoclint/package:java.*,javax.*' -Xlint:-exports
320320
java.naming_CLEAN := jndiprovider.properties
321321

322322
################################################################################
@@ -344,6 +344,10 @@ jdk.charsets_COPY := .dat
344344

345345
################################################################################
346346

347+
jdk.accessibility_ADD_JAVAC_FLAGS := -Xlint:-exports
348+
349+
################################################################################
350+
347351
jdk.compiler_ADD_JAVAC_FLAGS := -Xdoclint:all/protected '-Xdoclint/package:-com.sun.tools.*' \
348352
-XDstringConcat=inline
349353
jdk.compiler_CLEAN_FILES := $(wildcard \
@@ -352,6 +356,10 @@ jdk.compiler_CLEAN_FILES := $(wildcard \
352356

353357
################################################################################
354358

359+
jdk.jshell_ADD_JAVAC_FLAGS := -Xlint:-exports
360+
361+
################################################################################
362+
355363
jdk.hotspot.agent_ADD_JAVAC_FLAGS := $(DISABLE_WARNINGS),-overrides
356364
jdk.hotspot.agent_COPY := .gif .png sa.js .properties
357365

@@ -428,6 +436,10 @@ jdk.jdi_EXCLUDE_FILES += jdi-overview.html
428436

429437
################################################################################
430438

439+
jdk.jsobject_ADD_JAVAC_FLAGS := -Xlint:-exports
440+
441+
################################################################################
442+
431443
jdk.dev_CLEAN_FILES := $(wildcard \
432444
$(patsubst %, $(JDK_TOPDIR)/src/jdk.dev/share/classes/%/*.properties, \
433445
com/sun/tools/script/shell))
@@ -440,6 +452,14 @@ jdk.jvmstat_COPY := aliasmap
440452

441453
################################################################################
442454

455+
jdk.security.jgss_ADD_JAVAC_FLAGS := -Xlint:-exports
456+
457+
################################################################################
458+
459+
jdk.vm.ci_ADD_JAVAC_FLAGS := -Xlint:-exports
460+
461+
################################################################################
462+
443463
jdk.xml.bind_SETUP := GENERATE_JDKBYTECODE_NOWARNINGS
444464
jdk.xml.bind_CLEAN := .properties
445465
jdk.xml.bind_COPY := .xsd JAXBContextFactory.java ZeroOneBooleanAdapter.java

make/CopyImportModules.gmk

+18-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
2+
# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
33
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
#
55
# This code is free software; you can redistribute it and/or modify it
@@ -59,9 +59,24 @@ ifneq ($(LIBS_DIR), )
5959
$(eval $(call SetupCopyFiles, COPY_LIBS, \
6060
SRC := $(LIBS_DIR), \
6161
DEST := $(JDK_OUTPUTDIR)/lib, \
62-
FILES := $(call CacheFind, $(LIBS_DIR)), \
62+
FILES := $(filter %$(SHARED_LIBRARY_SUFFIX), $(call CacheFind, $(LIBS_DIR))), \
6363
))
64-
TARGETS += $(COPY_LIBS)
64+
65+
# Use relative links if the import dir is inside the OUTPUT_ROOT, otherwise
66+
# copy to avoid having automated systems following symlinks when deleting files,
67+
# or risk invalidating the build output from external changes.
68+
ifeq ($(filter $(OUTPUT_ROOT)/%, $(LIBS_DIR)), )
69+
LINK_MACRO := install-file
70+
else
71+
LINK_MACRO := link-file-relative
72+
endif
73+
$(eval $(call SetupCopyFiles, LINK_LIBS, \
74+
SRC := $(LIBS_DIR), \
75+
DEST := $(JDK_OUTPUTDIR)/lib, \
76+
FILES := $(filter-out %$(SHARED_LIBRARY_SUFFIX), $(call CacheFind, $(LIBS_DIR))), \
77+
MACRO := $(LINK_MACRO), \
78+
))
79+
TARGETS += $(COPY_LIBS) $(LINK_LIBS)
6580
endif
6681
endif
6782

make/CreateJmods.gmk

+3-3
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ endif
3838
JMODS_DIR := $(IMAGES_OUTPUTDIR)/jmods
3939

4040
LIBS_DIR := $(firstword $(wildcard $(addsuffix /$(MODULE), \
41-
$(SUPPORT_OUTPUTDIR)/modules_libs-stripped $(IMPORT_MODULES_LIBS))))
41+
$(SUPPORT_OUTPUTDIR)/modules_libs $(IMPORT_MODULES_LIBS))))
4242
CMDS_DIR := $(firstword $(wildcard $(addsuffix /$(MODULE), \
43-
$(SUPPORT_OUTPUTDIR)/modules_cmds-stripped $(IMPORT_MODULES_CMDS))))
43+
$(SUPPORT_OUTPUTDIR)/modules_cmds $(IMPORT_MODULES_CMDS))))
4444
CONF_DIR := $(firstword $(wildcard $(addsuffix /$(MODULE), \
4545
$(SUPPORT_OUTPUTDIR)/modules_conf $(IMPORT_MODULES_CONF))))
4646
CLASSES_DIR := $(wildcard $(JDK_OUTPUTDIR)/modules/$(MODULE))
@@ -103,7 +103,7 @@ $(JMODS_DIR)/$(MODULE).jmod: $(DEPS)
103103
--os-arch $(OPENJDK_TARGET_CPU_LEGACY) \
104104
--os-version $(REQUIRED_OS_VERSION) \
105105
--module-path $(JMODS_DIR) \
106-
--exclude '**{_the.*,*.diz,*.debuginfo,*.dSYM/**,*.pdb,*.map}' \
106+
--exclude '**{_the.*,*.diz,*.debuginfo,*.dSYM/**,*.dSYM,*.pdb,*.map}' \
107107
$(JMOD_FLAGS) $(SUPPORT_OUTPUTDIR)/jmods/$(notdir $@)
108108
$(MV) $(SUPPORT_OUTPUTDIR)/jmods/$(notdir $@) $@
109109

make/Help.gmk

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
2+
# Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
33
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
#
55
# This code is free software; you can redistribute it and/or modify it
@@ -39,7 +39,8 @@ help:
3939
$(info $(_) make [default] # Compile all modules in langtools, hotspot, jdk, jaxws,)
4040
$(info $(_) # jaxp and corba, and create a runnable "exploded" image)
4141
$(info $(_) make all # Compile everything, all repos, docs and images)
42-
$(info $(_) make images # Create complete jdk and jre images)
42+
$(info $(_) make images # Create complete jdk and jre images (alias for product-images))
43+
$(info $(_) make <name>-image # Build just the image (jdk, jre, test, docs etc))
4344
$(info $(_) make <phase> # Build the specified phase and everything it depends on)
4445
$(info $(_) # (gensrc, java, copy, libs, launchers, gendata, rmic))
4546
$(info $(_) make *-only # Applies to most targets and disables compling the)

make/Images.gmk

+38-17
Original file line numberDiff line numberDiff line change
@@ -382,14 +382,28 @@ endif
382382

383383
################################################################################
384384
# /demo dir
385-
ifneq ($(findstring images, $(MAKECMDGOALS)), )
385+
# Avoid doing the expensive find unless called with "jdk" as target.
386+
ifneq ($(filter jdk, $(MAKECMDGOALS)), )
387+
388+
DEMO_FILES := \
389+
$(if $(wildcard $(SUPPORT_OUTPUTDIR)/demos/image), \
390+
$(call DoubleDollar, $(call DoubleDollar, \
391+
$(shell $(FIND) $(SUPPORT_OUTPUTDIR)/demos/image \
392+
-type f -a ! \( -name "_the*" -o -name "javac_state" \) ))) \
393+
)
394+
395+
ifeq ($(ZIP_EXTERNAL_DEBUG_SYMBOLS), true)
396+
ifeq ($(OPENJDK_TARGET_OS), macosx)
397+
DEMO_FILES := $(call not-containing, .dSYM, $(DEMO_FILES))
398+
else
399+
DEMO_FILES := $(filter-out %.debuginfo %.pdb %.map, $(DEMO_FILES))
400+
endif
401+
endif
402+
386403
$(eval $(call SetupCopyFiles, JDK_COPY_DEMOS, \
387404
SRC := $(SUPPORT_OUTPUTDIR)/demos/image, \
388405
DEST := $(JDK_IMAGE_DIR)/demo, \
389-
FILES := $(if $(wildcard $(SUPPORT_OUTPUTDIR)/demos/image), \
390-
$(call DoubleDollar, $(call DoubleDollar, \
391-
$(shell $(FIND) $(SUPPORT_OUTPUTDIR)/demos/image \
392-
-type f -a ! \( -name "_the*" -o -name "javac_state" \) )))), \
406+
FILES := $(DEMO_FILES), \
393407
))
394408

395409
JDK_TARGETS += $(JDK_COPY_DEMOS)
@@ -454,21 +468,25 @@ else
454468
LIBS_TARGET_SUBDIR := lib
455469
endif
456470

457-
DEBUGINFO_SUFFIXES := .diz .debuginfo .pdb .map
458-
459471
# Param 1 - dir to find debuginfo files in
460472
FindDebuginfoFiles = \
461473
$(wildcard $(addprefix $1/*, $(DEBUGINFO_SUFFIXES)) \
462474
$(addprefix $1/*/*, $(DEBUGINFO_SUFFIXES)) \
463475
$(addprefix $1/*/*/*, $(DEBUGINFO_SUFFIXES)))
464476

465-
# On Macosx, if debug symbols have not been zipped, find all files inside *.dSYM
466-
# dirs.
467-
ifeq ($(OPENJDK_TARGET_OS)-$(ZIP_EXTERNAL_DEBUG_SYMBOLS), macosx-false)
468-
$(eval $(call FillCacheFind, \
469-
$(SUPPORT_OUTPUTDIR)/modules_cmds $(SUPPORT_OUTPUTDIR)/modules_libs/))
470-
FindDebuginfoFiles = \
471-
$(if $(wildcard $1), $(call containing, .dSYM/, $(call CacheFind, $1)))
477+
# Pick the correct debug info files to copy, either zipped or not.
478+
ifeq ($(ZIP_EXTERNAL_DEBUG_SYMBOLS), true)
479+
DEBUGINFO_SUFFIXES += .diz
480+
else
481+
DEBUGINFO_SUFFIXES := .debuginfo .pdb .map
482+
# On Macosx, if debug symbols have not been zipped, find all files inside *.dSYM
483+
# dirs.
484+
ifeq ($(OPENJDK_TARGET_OS), macosx)
485+
$(eval $(call FillCacheFind, \
486+
$(SUPPORT_OUTPUTDIR)/modules_cmds $(SUPPORT_OUTPUTDIR)/modules_libs))
487+
FindDebuginfoFiles = \
488+
$(if $(wildcard $1), $(call containing, .dSYM/, $(call CacheFind, $1)))
489+
endif
472490
endif
473491

474492
# Param 1 - either JDK or JRE
@@ -499,8 +517,11 @@ $(eval $(call IncludeCustomExtension, , Images-post.gmk))
499517
$(JRE_TARGETS): $(TOOL_JRE_TARGETS)
500518
$(JDK_TARGETS): $(TOOL_JDK_TARGETS)
501519

502-
jimages: $(TOOL_JRE_TARGETS) $(TOOL_JDK_TARGETS) $(JRE_TARGETS) $(JDK_TARGETS) \
503-
$(SYMBOLS_TARGETS)
520+
jdk: $(JDK_TARGETS)
521+
jre: $(JRE_TARGETS)
522+
symbols: $(SYMBOLS_TARGETS)
523+
524+
all: jdk jre symbols
504525

505526
$(JRE_COMPACT1_TARGETS): $(TOOL_JRE_COMPACT1_TARGETS)
506527
$(JRE_COMPACT2_TARGETS): $(TOOL_JRE_COMPACT2_TARGETS)
@@ -513,4 +534,4 @@ profiles: $(TOOL_JRE_COMPACT1_TARGETS) \
513534
$(JRE_COMPACT2_TARGETS) \
514535
$(JRE_COMPACT3_TARGETS)
515536

516-
.PHONY: default all jimages profiles
537+
.PHONY: default all jdk jre symbols profiles

make/Javadoc.gmk

+11-13
Original file line numberDiff line numberDiff line change
@@ -773,19 +773,17 @@ $(JDWP_DOCDIR)/jdwp-protocol.html : $(SUPPORT_OUTPUTDIR)/gensrc/jdk.jdi/jdwp-pro
773773
# jvmtidocs
774774
#
775775

776-
ALL_OTHER_TARGETS += jvmtidocs
777-
778-
JVMTI_DOCDIR = $(PLATFORM_DOCSDIR)/jvmti
779-
JVMTI_HTML = $(HOTSPOT_DIST)/docs/platform/jvmti/jvmti.html
780-
781-
jvmtidocs: $(JVMTI_DOCDIR)/jvmti.html
782-
$(JVMTI_DOCDIR)/jvmti.html:
783-
@$(prep-javadoc)
784-
@if [ -f $(JVMTI_HTML) ] ; then \
785-
$(CP) $(JVMTI_HTML) $@; \
786-
else \
787-
$(ECHO) "WARNING: Generated file does not exist: $(JVMTI_HTML)"; \
788-
fi
776+
JVMTI_DOCDIR := $(PLATFORM_DOCSDIR)/jvmti
777+
# Pick jvmti.html from any jvm variant, they are all the same.
778+
JVMTI_HTML := $(firstword \
779+
$(wildcard $(HOTSPOT_OUTPUTDIR)/variant-*/gensrc/jvmtifiles/jvmti.html))
780+
781+
$(eval $(call SetupCopyFiles, COPY_JVMTI_HTML, \
782+
FILES := $(JVMTI_HTML), \
783+
DEST := $(PLATFORM_DOCSDIR)/jvmti, \
784+
))
785+
786+
jvmtidocs: $(COPY_JVMTI_HTML)
789787

790788
#############################################################
791789
#

0 commit comments

Comments
 (0)