提交 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
......@@ -645,7 +645,7 @@ $(RT_JAR_FILELIST) + $(RES_JAR_FILELIST): \
@$(java-vm-cleanup)
# Create the manifest file.
JAR_MANIFEST_FILE=$(TEMPDIR)/manifest.tmp
JAR_MANIFEST_FILE=$(ABS_TEMPDIR)/manifest.tmp
$(JAR_MANIFEST_FILE): $(MAINMANIFEST) $(BEANMANIFEST)
$(prep-target)
$(SED) -e "s/@@RELEASE@@/$(RELEASE)/" $(MAINMANIFEST) >> $@
......@@ -653,25 +653,22 @@ $(JAR_MANIFEST_FILE): $(MAINMANIFEST) $(BEANMANIFEST)
$(CAT) $(BEANMANIFEST) >> $@
# Create resources.jar containing non-class files
RESOURCES_JAR=$(TEMPDIR)/resources-orig.jar
RES_JAR_ARGLIST=$(RES_JAR_FILELIST)_args
$(RES_JAR_ARGLIST): $(RES_JAR_FILELIST)
$(prep-target)
$(SED) -e "s@^@-C $(CLASSBINDIR) @" $< > $@
$(RESOURCES_JAR): $(RES_JAR_ARGLIST) $(JAR_MANIFEST_FILE)
RESOURCES_JAR=$(ABS_TEMPDIR)/resources-orig.jar
$(RESOURCES_JAR): $(RES_JAR_FILELIST) $(JAR_MANIFEST_FILE)
$(prep-target)
$(CD) $(CLASSBINDIR) && \
$(BOOT_JAR_CMD) c0mf $(JAR_MANIFEST_FILE) $@ \
@$(RES_JAR_ARGLIST) $(BOOT_JAR_JFLAGS)
@$(java-vm-cleanup)
@$(RES_JAR_FILELIST) $(BOOT_JAR_JFLAGS)
@$(CD) $(CLASSBINDIR) && $(java-vm-cleanup)
# 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)
$(prep-target)
$(CD) $(CLASSBINDIR) && \
$(BOOT_JAR_CMD) c0mf $(JAR_MANIFEST_FILE) $@ \
$(JSSE_CLASSES_DIRS:%=-C $(CLASSBINDIR) %) \
$(BOOT_JAR_JFLAGS)
@$(java-vm-cleanup)
$(JSSE_CLASSES_DIRS) $(BOOT_JAR_JFLAGS)
@$(CD) $(CLASSBINDIR) && $(java-vm-cleanup)
# Create sec-bin.zip
SEC_FILES_ZIP=$(ABS_TEMPDIR)/sec-bin.zip
......@@ -713,15 +710,12 @@ endif
# Create rt.jar
RT_JAR=$(ABS_TEMPDIR)/rt-orig.jar
RT_JAR_ARGLIST=$(RT_JAR_FILELIST)_args
$(RT_JAR_ARGLIST): $(RT_JAR_FILELIST)
$(prep-target)
$(SED) -e "s@^@-C $(CLASSBINDIR) @" $< > $@
$(RT_JAR): $(RT_JAR_ARGLIST) $(JAR_MANIFEST_FILE)
$(RT_JAR): $(RT_JAR_FILELIST) $(JAR_MANIFEST_FILE)
$(prep-target)
$(CD) $(CLASSBINDIR) && \
$(BOOT_JAR_CMD) c0mf $(JAR_MANIFEST_FILE) $@ \
@$(RT_JAR_ARGLIST) $(BOOT_JAR_JFLAGS)
@$(java-vm-cleanup)
@$(RT_JAR_FILELIST) $(BOOT_JAR_JFLAGS)
@$(CD) $(CLASSBINDIR) && $(java-vm-cleanup)
# Meta-index construction to make core class loaders lazier
......@@ -944,10 +938,10 @@ initial-image-jdk:: initial-image-jdk-setup \
@#
@# lib/tools.jar
@#
$(BOOT_JAR_CMD) c0f $(LIBDIR)/tools.jar $(addprefix \
-C $(CLASSBINDIR) , $(TOOLS)) \
$(BOOT_JAR_JFLAGS)
@$(java-vm-cleanup)
$(CD) $(CLASSBINDIR) && \
$(BOOT_JAR_CMD) c0f $(ABS_LIBDIR)/tools.jar \
$(TOOLS) $(BOOT_JAR_JFLAGS)
@$(CD) $(CLASSBINDIR) && $(java-vm-cleanup)
$(CP) $(LIBDIR)/tools.jar $(JDK_IMAGE_DIR)/lib/tools.jar
@#
@# lib/ct.sym
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册