8081814: Modularize the deploy build

Reviewed-by: ihse, ddehaven
This commit is contained in:
Erik Joelsson 2015-06-04 18:27:42 +02:00
parent 058d8664d4
commit b94a868049
8 changed files with 79 additions and 69 deletions

View File

@ -1188,28 +1188,11 @@ if [ "$SKIP_DEFAULT" != "true" ]; then
OTHER_JDK="$OTHER/install/jdk" OTHER_JDK="$OTHER/install/jdk"
OTHER_JRE="$OTHER/install/jre" OTHER_JRE="$OTHER/install/jre"
echo "Selecting install images for compare" echo "Selecting install images for compare"
elif [ -d "$THIS/deploy/jdk" -o -d "$THIS/deploy/images/jdk" ] \ elif [ -d "$THIS/images/jdk" ] && [ -d "$OTHER/deploy/images/jdk" ]; then
&& [ -d "$OTHER/deploy/jdk" -o -d "$OTHER/deploy/images/jdk" ]; then THIS_JDK="$THIS/images/jdk"
if [ -d "$THIS/deploy/images/jdk" ]; then THIS_JRE="$THIS/images/jre"
THIS_JDK="$THIS/deploy/images/jdk" OTHER_JDK="$OTHER/deploy/images/jdk"
THIS_JRE="$THIS/deploy/images/jre" OTHER_JRE="$OTHER/deploy/images/jre"
else
THIS_JDK="$THIS/deploy/jdk"
THIS_JRE="$THIS/deploy/jre"
fi
if [ -d "$OTHER/deploy/images/jdk" ]; then
OTHER_JDK="$OTHER/deploy/images/jdk"
OTHER_JRE="$OTHER/deploy/images/jre"
else
OTHER_JDK="$OTHER/deploy/jdk"
OTHER_JRE="$OTHER/deploy/jre"
fi
echo "Selecting deploy images for compare"
elif [ -d "$THIS/deploy/images/jdk" ] && [ -d "$OTHER/deploy/jdk" ]; then
THIS_JDK="$THIS/deploy/jdk"
THIS_JRE="$THIS/deploy/jre"
OTHER_JDK="$OTHER/deploy/jdk"
OTHER_JRE="$OTHER/deploy/jre"
echo "Selecting deploy images for compare" echo "Selecting deploy images for compare"
elif [ -d "$THIS/images/jdk" ] && [ -d "$OTHER/images/jdk" ]; then elif [ -d "$THIS/images/jdk" ] && [ -d "$OTHER/images/jdk" ]; then
THIS_JDK="$THIS/images/jdk" THIS_JDK="$THIS/images/jdk"
@ -1221,30 +1204,28 @@ if [ "$SKIP_DEFAULT" != "true" ]; then
echo "No common images found." echo "No common images found."
exit 1 exit 1
fi fi
echo " $THIS_JDK"
echo " $OTHER_JDK"
if [ -d "$THIS/deploy/jdk-bundle" -o -d "$THIS/deploy/images/jdk-bundle" ] \ if [ -d "$THIS/images/jdk-bundle" -o -d "$THIS/deploy/images/jdk-bundle" ] \
&& [ -d "$OTHER/deploy/jdk-bundle" -o -d "$OTHER/deploy/images/jdk-bundle" ]; then && [ -d "$OTHER/images/jdk-bundle" -o -d "$OTHER/deploy/images/jdk-bundle" ]; then
if [ -d "$THIS/deploy/images/jdk-bundle" ]; then if [ -d "$THIS/deploy/images/jdk-bundle" ]; then
THIS_JDK_BUNDLE="$THIS/deploy/images/jdk-bundle" THIS_JDK_BUNDLE="$THIS/deploy/images/jdk-bundle"
THIS_JRE_BUNDLE="$THIS/deploy/images/jre-bundle" THIS_JRE_BUNDLE="$THIS/deploy/images/jre-bundle"
else else
THIS_JDK_BUNDLE="$THIS/deploy/jdk-bundle" THIS_JDK_BUNDLE="$THIS/images/jdk-bundle"
THIS_JRE_BUNDLE="$THIS/deploy/jre-bundle" THIS_JRE_BUNDLE="$THIS/images/jre-bundle"
fi fi
if [ -d "$OTHER/deploy/images/jdk-bundle" ]; then if [ -d "$OTHER/deploy/images/jdk-bundle" ]; then
OTHER_JDK_BUNDLE="$OTHER/deploy/images/jdk-bundle" OTHER_JDK_BUNDLE="$OTHER/deploy/images/jdk-bundle"
OTHER_JRE_BUNDLE="$OTHER/deploy/images/jre-bundle" OTHER_JRE_BUNDLE="$OTHER/deploy/images/jre-bundle"
else else
OTHER_JDK_BUNDLE="$OTHER/deploy/jdk-bundle" OTHER_JDK_BUNDLE="$OTHER/images/jdk-bundle"
OTHER_JRE_BUNDLE="$OTHER/deploy/jre-bundle" OTHER_JRE_BUNDLE="$OTHER/images/jre-bundle"
fi fi
echo "Also comparing deploy macosx bundles"
elif [ -d "$THIS/images/jdk-bundle" ] && [ -d "$OTHER/images/jdk-bundle" ]; then
THIS_JDK_BUNDLE="$THIS/images/jdk-bundle"
THIS_JRE_BUNDLE="$THIS/images/jre-bundle"
OTHER_JDK_BUNDLE="$OTHER/images/jdk-bundle"
OTHER_JRE_BUNDLE="$OTHER/images/jre-bundle"
echo "Also comparing macosx bundles" echo "Also comparing macosx bundles"
echo " $THIS_JDK_BUNDLE"
echo " $OTHER_JDK_BUNDLE"
fi fi
if [ -d "$THIS/deploy/bundles" -o -d "$THIS/deploy/images/bundles" ] \ if [ -d "$THIS/deploy/bundles" -o -d "$THIS/deploy/images/bundles" ] \
@ -1262,19 +1243,21 @@ if [ "$SKIP_DEFAULT" != "true" ]; then
echo "Also comparing deploy javadoc bundles" echo "Also comparing deploy javadoc bundles"
fi fi
if [ -d "$THIS/deploy/JavaAppletPlugin.plugin" -o -d "$THIS/deploy/images/JavaAppletPlugin.plugin" ] \ if [ -d "$THIS/images/JavaAppletPlugin.plugin" ] \
&& [ -d "$OTHER/deploy/JavaAppletPlugin.plugin" -o -d "$OTHER/deploy/images/JavaAppletPlugin.plugin" ]; then && [ -d "$OTHER/images/JavaAppletPlugin.plugin" -o -d "$OTHER/deploy/images/JavaAppletPlugin.plugin" ]; then
if [ -d "$THIS/deploy/images/bundles" ]; then if [ -d "$THIS/images/JavaAppletPlugin.plugin" ]; then
THIS_DEPLOY_APPLET_PLUGIN_DIR="$THIS/images/JavaAppletPlugin.plugin"
else
THIS_DEPLOY_APPLET_PLUGIN_DIR="$THIS/deploy/images/JavaAppletPlugin.plugin" THIS_DEPLOY_APPLET_PLUGIN_DIR="$THIS/deploy/images/JavaAppletPlugin.plugin"
else
THIS_DEPLOY_APPLET_PLUGIN_DIR="$THIS/deploy/JavaAppletPlugin.plugin"
fi fi
if [ -d "$OTHER/deploy/images/bundles" ]; then if [ -d "$OTHER/images/JavaAppletPlugin.plugin" ]; then
OTHER_DEPLOY_APPLET_PLUGIN_DIR="$OTHER/deploy/images/JavaAppletPlugin.plugin" OTHER_DEPLOY_APPLET_PLUGIN_DIR="$OTHER/images/JavaAppletPlugin.plugin"
else else
OTHER_DEPLOY_APPLET_PLUGIN_DIR="$OTHER/deploy/JavaAppletPlugin.plugin" OTHER_DEPLOY_APPLET_PLUGIN_DIR="$OTHER/deploy/images/JavaAppletPlugin.plugin"
fi fi
echo "Also comparing deploy applet image" echo "Also comparing deploy applet image"
echo " $THIS_DEPLOY_APPLET_PLUGIN_DIR"
echo " $OTHER_DEPLOY_APPLET_PLUGIN_DIR"
fi fi
if [ -d "$OTHER/images" ]; then if [ -d "$OTHER/images" ]; then

View File

@ -517,7 +517,8 @@ define SetupModuleCompilation
# Find the module dependencies by parsing modules.list file # Find the module dependencies by parsing modules.list file
$1_DEPS := $$(call FindDepsForModule, $1) $1_DEPS := $$(call FindDepsForModule, $1)
$1_CLASSPATH := $$(addprefix $(JDK_OUTPUTDIR)/modules/,$$($1_DEPS)) $1_CLASSPATH := $$(foreach d,$$($1_DEPS), $$(if $$($$d_BIN), $$($$d_BIN), \
$(JDK_OUTPUTDIR)/modules/$$d))
# When crypto classes are prebuilt, need to look for classes already in # When crypto classes are prebuilt, need to look for classes already in
# output dir. # output dir.
ifneq ($(BUILD_CRYPTO), true) ifneq ($(BUILD_CRYPTO), true)
@ -534,10 +535,10 @@ define SetupModuleCompilation
$$(eval $$(call SetupJavaCompilation,$1, \ $$(eval $$(call SetupJavaCompilation,$1, \
SETUP := $$(if $$($1_SETUP), $$($1_SETUP), GENERATE_JDKBYTECODE), \ SETUP := $$(if $$($1_SETUP), $$($1_SETUP), GENERATE_JDKBYTECODE), \
SRC := $$(wildcard $$(call ALL_SRC_DIRS,$1)), \ SRC := $$(wildcard $$(call ALL_SRC_DIRS,$1)), \
INCLUDES:=$(JDK_USER_DEFINED_FILTER),\ INCLUDES := $(JDK_USER_DEFINED_FILTER),\
BIN := $(JDK_OUTPUTDIR)/modules/$1, \ BIN := $$(if $$($1_BIN), $$($1_BIN), $(JDK_OUTPUTDIR)/modules/$1), \
HEADERS := $(SUPPORT_OUTPUTDIR)/headers/$1, \ HEADERS := $(SUPPORT_OUTPUTDIR)/headers/$1, \
ADD_JAVAC_FLAGS := $$($1_JAVAC_FLAGS))) ADD_JAVAC_FLAGS := $$($1_ADD_JAVAC_FLAGS) $$($1_JAVAC_FLAGS)))
$1: $$($1) $$($1_COPY_EXTRA) $1: $$($1) $$($1_COPY_EXTRA)
@ -548,7 +549,8 @@ define SetupModuleCompilation
# Only the javac compilation actually depends on other modules so limit # Only the javac compilation actually depends on other modules so limit
# dependency declaration to that by using the *_COMPILE_TARGET variable. # dependency declaration to that by using the *_COMPILE_TARGET variable.
$$($1_COMPILE_TARGETS): $$(foreach d,$$($1_DEPS), \ $$($1_COMPILE_TARGETS): $$(foreach d,$$($1_DEPS), \
$$(call SetupJavaCompilationCompileTarget, $$d, $(JDK_OUTPUTDIR)/modules/$$d)) $$(call SetupJavaCompilationCompileTarget, $$d, \
$$(if $$($$d_BIN), $$($$d_BIN), $(JDK_OUTPUTDIR)/modules/$$d)))
endef endef
# Setup compilation for each module # Setup compilation for each module

View File

@ -104,6 +104,7 @@ JIMAGE_TOOL := $(JAVA_SMALL) \
MODULES_XML += $(SRC_ROOT)/modules.xml MODULES_XML += $(SRC_ROOT)/modules.xml
DEPENDENCIES := $(call CacheFind, \ DEPENDENCIES := $(call CacheFind, \
$(SUPPORT_OUTPUTDIR)/modules_cmds \ $(SUPPORT_OUTPUTDIR)/modules_cmds \
$(SUPPORT_OUTPUTDIR)/modules_conf \
$(SUPPORT_OUTPUTDIR)/modules_libs) \ $(SUPPORT_OUTPUTDIR)/modules_libs) \
$(wildcard $(JDK_OUTPUTDIR)/modules/*/_*) \ $(wildcard $(JDK_OUTPUTDIR)/modules/*/_*) \
$(MODULES_XML) $(MODULES_XML)
@ -452,10 +453,10 @@ endif
# /sample dir # /sample dir
$(eval $(call SetupCopyFiles,COPY_SAMPLES, \ $(eval $(call SetupCopyFiles,COPY_SAMPLES, \
SRC := $(SUPPORT_OUTPUTDIR)/sample, \ SRC := $(SUPPORT_OUTPUTDIR)/sample/image, \
DEST := $(JDK_IMAGE_DIR)/sample, \ DEST := $(JDK_IMAGE_DIR)/sample, \
FILES := $(if $(wildcard $(SUPPORT_OUTPUTDIR)/sample), \ FILES := $(if $(wildcard $(SUPPORT_OUTPUTDIR)/sample/image), \
$(call CacheFind,$(SUPPORT_OUTPUTDIR)/sample)))) $(call CacheFind,$(SUPPORT_OUTPUTDIR)/sample/image))))
JDK_TARGETS += $(COPY_SAMPLES) JDK_TARGETS += $(COPY_SAMPLES)

View File

@ -37,9 +37,9 @@ ifeq ($(OPENJDK_TARGET_OS), macosx)
MACOSX_PLIST_SRC := $(JDK_TOPDIR)/make/data/bundle MACOSX_PLIST_SRC := $(JDK_TOPDIR)/make/data/bundle
BUNDLE_ID := $(MACOSX_BUNDLE_ID_BASE).$(JDK_MINOR_VERSION)u$(JDK_UPDATE_VERSION) BUNDLE_ID := $(MACOSX_BUNDLE_ID_BASE).$(JDK_MINOR_VERSION)u$(JDK_UPDATE_VERSION)
BUNDLE_NAME := $(MACOSX_BUNDLE_NAME_BASE) $(JDK_MINOR_VERSION) BUNDLE_NAME := $(MACOSX_BUNDLE_NAME_BASE) $(JDK_MINOR_VERSION)
BUNDLE_INFO := $(MACOSX_BUNDLE_NAME_BASE) $(JDK_VERSION) BUNDLE_INFO := $(MACOSX_BUNDLE_NAME_BASE) $(JDK_VERSION)
BUNDLE_PLATFORM_VERSION := $(JDK_MAJOR_VERSION).$(JDK_MINOR_VERSION) BUNDLE_PLATFORM_VERSION := $(JDK_MAJOR_VERSION).$(JDK_MINOR_VERSION)
BUNDLE_VERSION := $(JDK_VERSION) BUNDLE_VERSION := $(JDK_VERSION)
ifeq ($(COMPANY_NAME), N/A) ifeq ($(COMPANY_NAME), N/A)
@ -56,23 +56,23 @@ ifeq ($(OPENJDK_TARGET_OS), macosx)
# Copy empty directories (jre/lib/applet). # Copy empty directories (jre/lib/applet).
$(JDK_MACOSX_BUNDLE_DIR)/Home/%: $(JDK_IMAGE_DIR)/% $(JDK_MACOSX_BUNDLE_DIR)/Home/%: $(JDK_IMAGE_DIR)/%
$(ECHO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@) $(ECHO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@) $(LOG_INFO)
$(MKDIR) -p $(@D) $(MKDIR) -p $(@D)
if [ -d "$<" ]; then $(MKDIR) -p $@; else $(CP) -f -R -P '$<' '$@'; fi if [ -d "$<" ]; then $(MKDIR) -p $@; else $(CP) -f -R -P '$<' '$@'; fi
$(JRE_MACOSX_BUNDLE_DIR)/Home/%: $(JRE_IMAGE_DIR)/% $(JRE_MACOSX_BUNDLE_DIR)/Home/%: $(JRE_IMAGE_DIR)/%
$(ECHO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@) $(ECHO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@) $(LOG_INFO)
$(MKDIR) -p $(@D) $(MKDIR) -p $(@D)
if [ -d "$<" ]; then $(MKDIR) -p $@; else $(CP) -f -R -P '$<' '$@'; fi if [ -d "$<" ]; then $(MKDIR) -p $@; else $(CP) -f -R -P '$<' '$@'; fi
$(JDK_MACOSX_BUNDLE_DIR)/MacOS/libjli.dylib: $(JDK_MACOSX_BUNDLE_DIR)/MacOS/libjli.dylib:
$(ECHO) Creating link $(patsubst $(OUTPUT_ROOT)/%,%,$@) $(ECHO) Creating link $(patsubst $(OUTPUT_ROOT)/%,%,$@) $(LOG_INFO)
$(MKDIR) -p $(@D) $(MKDIR) -p $(@D)
$(RM) $@ $(RM) $@
$(LN) -s ../Home/lib/jli/libjli.dylib $@ $(LN) -s ../Home/lib/jli/libjli.dylib $@
$(JRE_MACOSX_BUNDLE_DIR)/MacOS/libjli.dylib: $(JRE_MACOSX_BUNDLE_DIR)/MacOS/libjli.dylib:
$(ECHO) Creating link $(patsubst $(OUTPUT_ROOT)/%,%,$@) $(ECHO) Creating link $(patsubst $(OUTPUT_ROOT)/%,%,$@) $(LOG_INFO)
$(MKDIR) -p $(@D) $(MKDIR) -p $(@D)
$(RM) $@ $(RM) $@
$(LN) -s ../Home/lib/jli/libjli.dylib $@ $(LN) -s ../Home/lib/jli/libjli.dylib $@

View File

@ -140,7 +140,7 @@ JAVA_TARGETS := $(addsuffix -java, $(JAVA_MODULES))
define DeclareCompileJavaRecipe define DeclareCompileJavaRecipe
$1-java: $1-java:
+($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f CompileJavaModules.gmk \ +($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f CompileJavaModules.gmk \
$1 JAVA_MODULES=$1) $1 JAVA_MODULES=$1 MODULE=$1)
endef endef
$(foreach m, $(filter-out jdk.scripting.nashorn, $(JAVA_MODULES)), \ $(foreach m, $(filter-out jdk.scripting.nashorn, $(JAVA_MODULES)), \
@ -198,13 +198,13 @@ ALL_TARGETS += hotspot
################################################################################ ################################################################################
# Build demos and samples targets # Build demos and samples targets
demos: demos-jdk:
+($(CD) $(JDK_TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CompileDemos.gmk) +($(CD) $(JDK_TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CompileDemos.gmk)
samples: samples-jdk:
+($(CD) $(JDK_TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CopySamples.gmk) +($(CD) $(JDK_TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CopySamples.gmk)
ALL_TARGETS += demos samples ALL_TARGETS += demos-jdk samples-jdk
################################################################################ ################################################################################
# Image targets # Image targets
@ -241,11 +241,11 @@ jimages:
profiles: profiles:
+($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f Images.gmk profiles) +($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f Images.gmk profiles)
mac-bundles: mac-bundles-jdk:
+($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f MacBundles.gmk) +($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f MacBundles.gmk)
ALL_TARGETS += source-tips bootcycle-images zip-security zip-source strip-binaries \ ALL_TARGETS += source-tips bootcycle-images zip-security zip-source strip-binaries \
jrtfs-jar jimages profiles mac-bundles jrtfs-jar jimages profiles mac-bundles-jdk
################################################################################ ################################################################################
# Docs targets # Docs targets
@ -359,6 +359,8 @@ else
$(RMIC_TARGETS): interim-langtools interim-corba interim-rmic $(RMIC_TARGETS): interim-langtools interim-corba interim-rmic
$(JAVA_TARGETS): interim-langtools
import-hotspot: hotspot import-hotspot: hotspot
$(LIBS_TARGETS): import-hotspot $(LIBS_TARGETS): import-hotspot
@ -368,7 +370,7 @@ else
# The demos are currently linking to libjvm and libjava, just like all other # The demos are currently linking to libjvm and libjava, just like all other
# jdk libs, even though they don't need to. To avoid warnings, make sure they # jdk libs, even though they don't need to. To avoid warnings, make sure they
# aren't built until after libjava and libjvm are available to link to. # aren't built until after libjava and libjvm are available to link to.
demos: $(JAVA_TARGETS) demos-jdk: $(JAVA_TARGETS)
# Declare dependency from <module>-java to <module>-gensrc # Declare dependency from <module>-java to <module>-gensrc
$(foreach m, $(GENSRC_MODULES), $(eval $m-java: $m-gensrc)) $(foreach m, $(GENSRC_MODULES), $(eval $m-java: $m-gensrc))
@ -428,7 +430,7 @@ else
profiles: exploded-image strip-binaries source-tips profiles: exploded-image strip-binaries source-tips
mac-bundles: jimages mac-bundles-jdk: jimages
bootcycle-images: jimages bootcycle-images: jimages
@ -489,9 +491,15 @@ $(foreach m, $(COPY_MODULES), $(eval $m: $m-copy))
ALL_MODULE_TARGETS := $(sort $(GENSRC_MODULES) $(JAVA_MODULES) \ ALL_MODULE_TARGETS := $(sort $(GENSRC_MODULES) $(JAVA_MODULES) \
$(GENDATA_MODULES) $(LIBS_MODULES) $(LAUNCHER_MODULES) $(COPY_MODULES)) $(GENDATA_MODULES) $(LIBS_MODULES) $(LAUNCHER_MODULES) $(COPY_MODULES))
demos: demos-jdk
samples: samples-jdk
# The "exploded image" is a locally runnable JDK in $(BUILD_OUTPUT)/jdk. # The "exploded image" is a locally runnable JDK in $(BUILD_OUTPUT)/jdk.
exploded-image: $(ALL_MODULE_TARGETS) exploded-image: $(ALL_MODULE_TARGETS)
mac-bundles: mac-bundles-jdk
# The $(BUILD_OUTPUT)/images directory contain the resulting deliverables, # The $(BUILD_OUTPUT)/images directory contain the resulting deliverables,
# and in line with this, our targets for creating these are named *-image[s]. # and in line with this, our targets for creating these are named *-image[s].
@ -514,8 +522,8 @@ test-image: prepare-test-image test-image-hotspot-jtreg-native \
all-images: product-images test-image docs-image all-images: product-images test-image docs-image
ALL_TARGETS += buildtools gensrc gendata copy java rmic libs launchers \ ALL_TARGETS += buildtools gensrc gendata copy java rmic libs launchers \
jdk.jdwp.agent-gensrc $(ALL_MODULE_TARGETS) exploded-image \ jdk.jdwp.agent-gensrc $(ALL_MODULE_TARGETS) demos samples exploded-image \
product-images docs-image test-image all-images mac-bundles product-images docs-image test-image all-images
################################################################################ ################################################################################

View File

@ -65,7 +65,7 @@ define Clean-java
@$(PRINTF) "Cleaning java $(if $1,for $(strip $1) )..." @$(PRINTF) "Cleaning java $(if $1,for $(strip $1) )..."
@$(PRINTF) "\n" $(LOG_DEBUG) @$(PRINTF) "\n" $(LOG_DEBUG)
$(RM) -r $(JDK_OUTPUTDIR)/modules/$(strip $1) $(RM) -r $(JDK_OUTPUTDIR)/modules/$(strip $1)
$(RM) -r $(SUPPORT_OUTPUTDIR)/misc/$(strip $1) $(RM) -r $(SUPPORT_OUTPUTDIR)/special_classes/$(strip $1)
$(PRINTF) " done\n" $(PRINTF) " done\n"
$(PRINTF) "Cleaning headers $(if $1,for $(strip $1)) ..." $(PRINTF) "Cleaning headers $(if $1,for $(strip $1)) ..."
$(RM) -r $(SUPPORT_OUTPUTDIR)/headers/$(strip $1) $(RM) -r $(SUPPORT_OUTPUTDIR)/headers/$(strip $1)

View File

@ -28,6 +28,9 @@ default: all
include $(SPEC) include $(SPEC)
include MakeBase.gmk include MakeBase.gmk
# Hook to include the corresponding custom file, if present.
$(eval $(call IncludeCustomExtension, , StripBinaries.gmk))
################################################################################ ################################################################################
# Copy native libraries and executables to a secondary location to strip them # Copy native libraries and executables to a secondary location to strip them
# and filter out files that shouldn't go into the image. # and filter out files that shouldn't go into the image.
@ -51,11 +54,13 @@ else
endef endef
endif endif
NO_STRIP_CMDS_FILTER += %.cgi
# Don't include debug info for executables. # Don't include debug info for executables.
ALL_CMDS_SRC := $(filter-out %.bc %.debuginfo %.diz %.map %.pdb, \ ALL_CMDS_SRC := $(filter-out %.bc %.debuginfo %.diz %.map %.pdb, \
$(shell $(FIND) $(SUPPORT_OUTPUTDIR)/modules_cmds -type f -o -type l)) $(shell $(FIND) $(SUPPORT_OUTPUTDIR)/modules_cmds -type f -o -type l))
COPY_CMDS_SRC := $(filter %.cgi, $(ALL_CMDS_SRC)) COPY_CMDS_SRC := $(filter $(NO_STRIP_CMDS_FILTER), $(ALL_CMDS_SRC))
STRIP_CMDS_SRC := $(filter-out $(COPY_CMDS_SRC), $(ALL_CMDS_SRC)) STRIP_CMDS_SRC := $(filter-out $(NO_STRIP_CMDS_FILTER), $(ALL_CMDS_SRC))
# Make sure symbolic links are copied and not stripped # Make sure symbolic links are copied and not stripped
COPY_LIBS_SRC := \ COPY_LIBS_SRC := \

View File

@ -753,6 +753,17 @@ DependOnVariableHelper = \
DependOnVariable = \ DependOnVariable = \
$(call DependOnVariableHelper,$(strip $1),$(strip $2)) $(call DependOnVariableHelper,$(strip $1),$(strip $2))
################################################################################
# Find lib dir for module
# Param 1 - module name
ifeq ($(OPENJDK_TARGET_OS_TYPE), unix)
FindLibDirForModule = \
$(SUPPORT_OUTPUTDIR)/modules_libs/$(strip $1)$(OPENJDK_TARGET_CPU_LIBDIR)
else
FindLibDirForModule = \
$(SUPPORT_OUTPUTDIR)/modules_libs/$(strip $1)
endif
################################################################################ ################################################################################
# Hook to include the corresponding custom file, if present. # Hook to include the corresponding custom file, if present.