提交 495ed286 编写于 作者: M martin

6853806: Prefer (cd $dir && jar) to jar -C for performance reasons

Summary: Eliminate (most) uses of jar -C
Reviewed-by: ohair
上级 f0a63752
...@@ -97,7 +97,7 @@ else ...@@ -97,7 +97,7 @@ else
ifeq ($(PLATFORM), windows) ifeq ($(PLATFORM), windows)
LICENSE_DOCLIST_JDK = $(subst $(LICENSE_VERSION),,\ LICENSE_DOCLIST_JDK = $(subst $(LICENSE_VERSION),,\
$(shell $(CD) $(SHARE_JDK_DOC_SRC) && \ $(shell $(CD) $(SHARE_JDK_DOC_SRC) && \
$(LS) *LICENSE*$(LICENSE_VERSION))) $(LS) *LICENSE*$(LICENSE_VERSION)))
LICENSE_DOCLIST_JRE = $(subst $(LICENSE_VERSION),,\ LICENSE_DOCLIST_JRE = $(subst $(LICENSE_VERSION),,\
$(shell $(CD) $(SHARE_JRE_DOC_SRC) && \ $(shell $(CD) $(SHARE_JRE_DOC_SRC) && \
$(LS) *LICENSE*$(LICENSE_VERSION))) $(LS) *LICENSE*$(LICENSE_VERSION)))
...@@ -401,7 +401,7 @@ TOOLS = \ ...@@ -401,7 +401,7 @@ TOOLS = \
sun/tools/jstack \ sun/tools/jstack \
sun/tools/jinfo \ sun/tools/jinfo \
sun/tools/jmap sun/tools/jmap
# classes that go into jsse.jar # classes that go into jsse.jar
JSSE_CLASSES_DIRS = \ JSSE_CLASSES_DIRS = \
sun/security/provider/Sun.class \ sun/security/provider/Sun.class \
...@@ -645,7 +645,7 @@ $(RT_JAR_FILELIST) + $(RES_JAR_FILELIST): \ ...@@ -645,7 +645,7 @@ $(RT_JAR_FILELIST) + $(RES_JAR_FILELIST): \
@$(java-vm-cleanup) @$(java-vm-cleanup)
# Create the manifest file. # Create the manifest file.
JAR_MANIFEST_FILE=$(TEMPDIR)/manifest.tmp JAR_MANIFEST_FILE=$(ABS_TEMPDIR)/manifest.tmp
$(JAR_MANIFEST_FILE): $(MAINMANIFEST) $(BEANMANIFEST) $(JAR_MANIFEST_FILE): $(MAINMANIFEST) $(BEANMANIFEST)
$(prep-target) $(prep-target)
$(SED) -e "s/@@RELEASE@@/$(RELEASE)/" $(MAINMANIFEST) >> $@ $(SED) -e "s/@@RELEASE@@/$(RELEASE)/" $(MAINMANIFEST) >> $@
...@@ -653,25 +653,22 @@ $(JAR_MANIFEST_FILE): $(MAINMANIFEST) $(BEANMANIFEST) ...@@ -653,25 +653,22 @@ $(JAR_MANIFEST_FILE): $(MAINMANIFEST) $(BEANMANIFEST)
$(CAT) $(BEANMANIFEST) >> $@ $(CAT) $(BEANMANIFEST) >> $@
# Create resources.jar containing non-class files # Create resources.jar containing non-class files
RESOURCES_JAR=$(TEMPDIR)/resources-orig.jar RESOURCES_JAR=$(ABS_TEMPDIR)/resources-orig.jar
RES_JAR_ARGLIST=$(RES_JAR_FILELIST)_args $(RESOURCES_JAR): $(RES_JAR_FILELIST) $(JAR_MANIFEST_FILE)
$(RES_JAR_ARGLIST): $(RES_JAR_FILELIST)
$(prep-target) $(prep-target)
$(SED) -e "s@^@-C $(CLASSBINDIR) @" $< > $@ $(CD) $(CLASSBINDIR) && \
$(RESOURCES_JAR): $(RES_JAR_ARGLIST) $(JAR_MANIFEST_FILE) $(BOOT_JAR_CMD) c0mf $(JAR_MANIFEST_FILE) $@ \
$(prep-target) @$(RES_JAR_FILELIST) $(BOOT_JAR_JFLAGS)
$(BOOT_JAR_CMD) c0mf $(JAR_MANIFEST_FILE) $@ \ @$(CD) $(CLASSBINDIR) && $(java-vm-cleanup)
@$(RES_JAR_ARGLIST) $(BOOT_JAR_JFLAGS)
@$(java-vm-cleanup)
# Create jsse.jar containing SunJSSE implementation classes # Create jsse.jar containing SunJSSE implementation classes
JSSE_JAR=$(TEMPDIR)/jsse-orig.jar JSSE_JAR=$(ABS_TEMPDIR)/jsse-orig.jar
$(JSSE_JAR): $(JAR_MANIFEST_FILE) $(JSSE_JAR): $(JAR_MANIFEST_FILE)
$(prep-target) $(prep-target)
$(BOOT_JAR_CMD) c0mf $(JAR_MANIFEST_FILE) $@ \ $(CD) $(CLASSBINDIR) && \
$(JSSE_CLASSES_DIRS:%=-C $(CLASSBINDIR) %) \ $(BOOT_JAR_CMD) c0mf $(JAR_MANIFEST_FILE) $@ \
$(BOOT_JAR_JFLAGS) $(JSSE_CLASSES_DIRS) $(BOOT_JAR_JFLAGS)
@$(java-vm-cleanup) @$(CD) $(CLASSBINDIR) && $(java-vm-cleanup)
# Create sec-bin.zip # Create sec-bin.zip
SEC_FILES_ZIP=$(ABS_TEMPDIR)/sec-bin.zip SEC_FILES_ZIP=$(ABS_TEMPDIR)/sec-bin.zip
...@@ -713,15 +710,12 @@ endif ...@@ -713,15 +710,12 @@ endif
# Create rt.jar # Create rt.jar
RT_JAR=$(ABS_TEMPDIR)/rt-orig.jar RT_JAR=$(ABS_TEMPDIR)/rt-orig.jar
RT_JAR_ARGLIST=$(RT_JAR_FILELIST)_args $(RT_JAR): $(RT_JAR_FILELIST) $(JAR_MANIFEST_FILE)
$(RT_JAR_ARGLIST): $(RT_JAR_FILELIST)
$(prep-target)
$(SED) -e "s@^@-C $(CLASSBINDIR) @" $< > $@
$(RT_JAR): $(RT_JAR_ARGLIST) $(JAR_MANIFEST_FILE)
$(prep-target) $(prep-target)
$(BOOT_JAR_CMD) c0mf $(JAR_MANIFEST_FILE) $@ \ $(CD) $(CLASSBINDIR) && \
@$(RT_JAR_ARGLIST) $(BOOT_JAR_JFLAGS) $(BOOT_JAR_CMD) c0mf $(JAR_MANIFEST_FILE) $@ \
@$(java-vm-cleanup) @$(RT_JAR_FILELIST) $(BOOT_JAR_JFLAGS)
@$(CD) $(CLASSBINDIR) && $(java-vm-cleanup)
# Meta-index construction to make core class loaders lazier # Meta-index construction to make core class loaders lazier
...@@ -944,10 +938,10 @@ initial-image-jdk:: initial-image-jdk-setup \ ...@@ -944,10 +938,10 @@ initial-image-jdk:: initial-image-jdk-setup \
@# @#
@# lib/tools.jar @# lib/tools.jar
@# @#
$(BOOT_JAR_CMD) c0f $(LIBDIR)/tools.jar $(addprefix \ $(CD) $(CLASSBINDIR) && \
-C $(CLASSBINDIR) , $(TOOLS)) \ $(BOOT_JAR_CMD) c0f $(ABS_LIBDIR)/tools.jar \
$(BOOT_JAR_JFLAGS) $(TOOLS) $(BOOT_JAR_JFLAGS)
@$(java-vm-cleanup) @$(CD) $(CLASSBINDIR) && $(java-vm-cleanup)
$(CP) $(LIBDIR)/tools.jar $(JDK_IMAGE_DIR)/lib/tools.jar $(CP) $(LIBDIR)/tools.jar $(JDK_IMAGE_DIR)/lib/tools.jar
@# @#
@# lib/ct.sym @# lib/ct.sym
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册