make/GenerateLinkOptData.gmk
author jcm
Thu, 19 Jan 2017 21:52:51 -0800
changeset 43470 39d4bc6c9989
parent 41874 07c3c4f1eb63
child 43783 35fe9d6f5075
permissions -rw-r--r--
8173038: [TESTBUG] compiler/loopopts/UseCountedLoopSafepointsTest.java fails with TESTBUG: Not server mode Summary: remove wrong extra check that got added as part of JDK-8166002 emulated client on win32. Reviewed-by: kvn
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
41874
07c3c4f1eb63 8168108: lib/classlist should be packaged in java.base.jmod
erikj
parents:
diff changeset
     1
#
07c3c4f1eb63 8168108: lib/classlist should be packaged in java.base.jmod
erikj
parents:
diff changeset
     2
# Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
07c3c4f1eb63 8168108: lib/classlist should be packaged in java.base.jmod
erikj
parents:
diff changeset
     3
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
07c3c4f1eb63 8168108: lib/classlist should be packaged in java.base.jmod
erikj
parents:
diff changeset
     4
#
07c3c4f1eb63 8168108: lib/classlist should be packaged in java.base.jmod
erikj
parents:
diff changeset
     5
# This code is free software; you can redistribute it and/or modify it
07c3c4f1eb63 8168108: lib/classlist should be packaged in java.base.jmod
erikj
parents:
diff changeset
     6
# under the terms of the GNU General Public License version 2 only, as
07c3c4f1eb63 8168108: lib/classlist should be packaged in java.base.jmod
erikj
parents:
diff changeset
     7
# published by the Free Software Foundation.  Oracle designates this
07c3c4f1eb63 8168108: lib/classlist should be packaged in java.base.jmod
erikj
parents:
diff changeset
     8
# particular file as subject to the "Classpath" exception as provided
07c3c4f1eb63 8168108: lib/classlist should be packaged in java.base.jmod
erikj
parents:
diff changeset
     9
# by Oracle in the LICENSE file that accompanied this code.
07c3c4f1eb63 8168108: lib/classlist should be packaged in java.base.jmod
erikj
parents:
diff changeset
    10
#
07c3c4f1eb63 8168108: lib/classlist should be packaged in java.base.jmod
erikj
parents:
diff changeset
    11
# This code is distributed in the hope that it will be useful, but WITHOUT
07c3c4f1eb63 8168108: lib/classlist should be packaged in java.base.jmod
erikj
parents:
diff changeset
    12
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
07c3c4f1eb63 8168108: lib/classlist should be packaged in java.base.jmod
erikj
parents:
diff changeset
    13
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
07c3c4f1eb63 8168108: lib/classlist should be packaged in java.base.jmod
erikj
parents:
diff changeset
    14
# version 2 for more details (a copy is included in the LICENSE file that
07c3c4f1eb63 8168108: lib/classlist should be packaged in java.base.jmod
erikj
parents:
diff changeset
    15
# accompanied this code).
07c3c4f1eb63 8168108: lib/classlist should be packaged in java.base.jmod
erikj
parents:
diff changeset
    16
#
07c3c4f1eb63 8168108: lib/classlist should be packaged in java.base.jmod
erikj
parents:
diff changeset
    17
# You should have received a copy of the GNU General Public License version
07c3c4f1eb63 8168108: lib/classlist should be packaged in java.base.jmod
erikj
parents:
diff changeset
    18
# 2 along with this work; if not, write to the Free Software Foundation,
07c3c4f1eb63 8168108: lib/classlist should be packaged in java.base.jmod
erikj
parents:
diff changeset
    19
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
07c3c4f1eb63 8168108: lib/classlist should be packaged in java.base.jmod
erikj
parents:
diff changeset
    20
#
07c3c4f1eb63 8168108: lib/classlist should be packaged in java.base.jmod
erikj
parents:
diff changeset
    21
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
07c3c4f1eb63 8168108: lib/classlist should be packaged in java.base.jmod
erikj
parents:
diff changeset
    22
# or visit www.oracle.com if you need additional information or have any
07c3c4f1eb63 8168108: lib/classlist should be packaged in java.base.jmod
erikj
parents:
diff changeset
    23
# questions.
07c3c4f1eb63 8168108: lib/classlist should be packaged in java.base.jmod
erikj
parents:
diff changeset
    24
#
07c3c4f1eb63 8168108: lib/classlist should be packaged in java.base.jmod
erikj
parents:
diff changeset
    25
07c3c4f1eb63 8168108: lib/classlist should be packaged in java.base.jmod
erikj
parents:
diff changeset
    26
################################################################################
07c3c4f1eb63 8168108: lib/classlist should be packaged in java.base.jmod
erikj
parents:
diff changeset
    27
# Generate classlist
07c3c4f1eb63 8168108: lib/classlist should be packaged in java.base.jmod
erikj
parents:
diff changeset
    28
################################################################################
07c3c4f1eb63 8168108: lib/classlist should be packaged in java.base.jmod
erikj
parents:
diff changeset
    29
07c3c4f1eb63 8168108: lib/classlist should be packaged in java.base.jmod
erikj
parents:
diff changeset
    30
default: all
07c3c4f1eb63 8168108: lib/classlist should be packaged in java.base.jmod
erikj
parents:
diff changeset
    31
07c3c4f1eb63 8168108: lib/classlist should be packaged in java.base.jmod
erikj
parents:
diff changeset
    32
include $(SPEC)
07c3c4f1eb63 8168108: lib/classlist should be packaged in java.base.jmod
erikj
parents:
diff changeset
    33
include MakeBase.gmk
07c3c4f1eb63 8168108: lib/classlist should be packaged in java.base.jmod
erikj
parents:
diff changeset
    34
include JarArchive.gmk
07c3c4f1eb63 8168108: lib/classlist should be packaged in java.base.jmod
erikj
parents:
diff changeset
    35
07c3c4f1eb63 8168108: lib/classlist should be packaged in java.base.jmod
erikj
parents:
diff changeset
    36
################################################################################
07c3c4f1eb63 8168108: lib/classlist should be packaged in java.base.jmod
erikj
parents:
diff changeset
    37
# Create a jar with our generator class. Using a jar is intentional since it
07c3c4f1eb63 8168108: lib/classlist should be packaged in java.base.jmod
erikj
parents:
diff changeset
    38
# will load more classes
07c3c4f1eb63 8168108: lib/classlist should be packaged in java.base.jmod
erikj
parents:
diff changeset
    39
07c3c4f1eb63 8168108: lib/classlist should be packaged in java.base.jmod
erikj
parents:
diff changeset
    40
$(eval $(call SetupJarArchive, CLASSLIST_JAR, \
07c3c4f1eb63 8168108: lib/classlist should be packaged in java.base.jmod
erikj
parents:
diff changeset
    41
    SRCS := $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes, \
07c3c4f1eb63 8168108: lib/classlist should be packaged in java.base.jmod
erikj
parents:
diff changeset
    42
    INCLUDES := build/tools/classlist, \
07c3c4f1eb63 8168108: lib/classlist should be packaged in java.base.jmod
erikj
parents:
diff changeset
    43
    JAR := $(SUPPORT_OUTPUTDIR)/classlist.jar, \
07c3c4f1eb63 8168108: lib/classlist should be packaged in java.base.jmod
erikj
parents:
diff changeset
    44
))
07c3c4f1eb63 8168108: lib/classlist should be packaged in java.base.jmod
erikj
parents:
diff changeset
    45
07c3c4f1eb63 8168108: lib/classlist should be packaged in java.base.jmod
erikj
parents:
diff changeset
    46
TARGETS += $(CLASSLIST_JAR)
07c3c4f1eb63 8168108: lib/classlist should be packaged in java.base.jmod
erikj
parents:
diff changeset
    47
07c3c4f1eb63 8168108: lib/classlist should be packaged in java.base.jmod
erikj
parents:
diff changeset
    48
################################################################################
07c3c4f1eb63 8168108: lib/classlist should be packaged in java.base.jmod
erikj
parents:
diff changeset
    49
07c3c4f1eb63 8168108: lib/classlist should be packaged in java.base.jmod
erikj
parents:
diff changeset
    50
LINK_OPT_DIR := $(SUPPORT_OUTPUTDIR)/link_opt
07c3c4f1eb63 8168108: lib/classlist should be packaged in java.base.jmod
erikj
parents:
diff changeset
    51
CLASSLIST_FILE := $(LINK_OPT_DIR)/classlist
07c3c4f1eb63 8168108: lib/classlist should be packaged in java.base.jmod
erikj
parents:
diff changeset
    52
JLI_TRACE_FILE := $(LINK_OPT_DIR)/jli_trace.out
07c3c4f1eb63 8168108: lib/classlist should be packaged in java.base.jmod
erikj
parents:
diff changeset
    53
07c3c4f1eb63 8168108: lib/classlist should be packaged in java.base.jmod
erikj
parents:
diff changeset
    54
# If an external buildjdk has been supplied, we don't build a separate interim
07c3c4f1eb63 8168108: lib/classlist should be packaged in java.base.jmod
erikj
parents:
diff changeset
    55
# image, so just use the external build jdk instead.
07c3c4f1eb63 8168108: lib/classlist should be packaged in java.base.jmod
erikj
parents:
diff changeset
    56
ifeq ($(EXTERNAL_BUILDJDK), true)
07c3c4f1eb63 8168108: lib/classlist should be packaged in java.base.jmod
erikj
parents:
diff changeset
    57
  INTERIM_IMAGE_DIR := $(BUILD_JDK)
07c3c4f1eb63 8168108: lib/classlist should be packaged in java.base.jmod
erikj
parents:
diff changeset
    58
endif
07c3c4f1eb63 8168108: lib/classlist should be packaged in java.base.jmod
erikj
parents:
diff changeset
    59
07c3c4f1eb63 8168108: lib/classlist should be packaged in java.base.jmod
erikj
parents:
diff changeset
    60
$(CLASSLIST_FILE): $(INTERIM_IMAGE_DIR)/bin/java$(EXE_SUFFIX) $(CLASSLIST_JAR)
07c3c4f1eb63 8168108: lib/classlist should be packaged in java.base.jmod
erikj
parents:
diff changeset
    61
	$(call MakeDir, $(LINK_OPT_DIR))
07c3c4f1eb63 8168108: lib/classlist should be packaged in java.base.jmod
erikj
parents:
diff changeset
    62
	$(call LogInfo, Generating $(patsubst $(OUTPUT_ROOT)/%, %, $@))
07c3c4f1eb63 8168108: lib/classlist should be packaged in java.base.jmod
erikj
parents:
diff changeset
    63
	$(call LogInfo, Generating $(patsubst $(OUTPUT_ROOT)/%, %, $(JLI_TRACE_FILE)))
07c3c4f1eb63 8168108: lib/classlist should be packaged in java.base.jmod
erikj
parents:
diff changeset
    64
	$(FIXPATH) $(INTERIM_IMAGE_DIR)/bin/java -XX:DumpLoadedClassList=$@ \
07c3c4f1eb63 8168108: lib/classlist should be packaged in java.base.jmod
erikj
parents:
diff changeset
    65
	    -Djava.lang.invoke.MethodHandle.TRACE_RESOLVE=true \
07c3c4f1eb63 8168108: lib/classlist should be packaged in java.base.jmod
erikj
parents:
diff changeset
    66
	    -cp $(SUPPORT_OUTPUTDIR)/classlist.jar \
07c3c4f1eb63 8168108: lib/classlist should be packaged in java.base.jmod
erikj
parents:
diff changeset
    67
	    build.tools.classlist.HelloClasslist \
07c3c4f1eb63 8168108: lib/classlist should be packaged in java.base.jmod
erikj
parents:
diff changeset
    68
	    $(LOG_DEBUG) 2>&1 > $(JLI_TRACE_FILE)
07c3c4f1eb63 8168108: lib/classlist should be packaged in java.base.jmod
erikj
parents:
diff changeset
    69
07c3c4f1eb63 8168108: lib/classlist should be packaged in java.base.jmod
erikj
parents:
diff changeset
    70
# The jli trace is created by the same recipe as classlist. By declaring these
07c3c4f1eb63 8168108: lib/classlist should be packaged in java.base.jmod
erikj
parents:
diff changeset
    71
# dependencies, make will correctly rebuild both jli trace and classlist
07c3c4f1eb63 8168108: lib/classlist should be packaged in java.base.jmod
erikj
parents:
diff changeset
    72
# incrementally using the single recpie above.
07c3c4f1eb63 8168108: lib/classlist should be packaged in java.base.jmod
erikj
parents:
diff changeset
    73
$(CLASSLIST_FILE): $(JLI_TRACE_FILE)
07c3c4f1eb63 8168108: lib/classlist should be packaged in java.base.jmod
erikj
parents:
diff changeset
    74
$(JLI_TRACE_FILE): $(INTERIM_IMAGE_DIR)/bin/java$(EXE_SUFFIX) $(CLASSLIST_JAR)
07c3c4f1eb63 8168108: lib/classlist should be packaged in java.base.jmod
erikj
parents:
diff changeset
    75
07c3c4f1eb63 8168108: lib/classlist should be packaged in java.base.jmod
erikj
parents:
diff changeset
    76
TARGETS += $(CLASSLIST_FILE) $(JLI_TRACE_FILE)
07c3c4f1eb63 8168108: lib/classlist should be packaged in java.base.jmod
erikj
parents:
diff changeset
    77
07c3c4f1eb63 8168108: lib/classlist should be packaged in java.base.jmod
erikj
parents:
diff changeset
    78
# Copy the classlist file into java.base libs
07c3c4f1eb63 8168108: lib/classlist should be packaged in java.base.jmod
erikj
parents:
diff changeset
    79
$(eval $(call SetupCopyFiles, COPY_CLASSLIST, \
07c3c4f1eb63 8168108: lib/classlist should be packaged in java.base.jmod
erikj
parents:
diff changeset
    80
    FILES := $(CLASSLIST_FILE), \
07c3c4f1eb63 8168108: lib/classlist should be packaged in java.base.jmod
erikj
parents:
diff changeset
    81
    DEST := $(SUPPORT_OUTPUTDIR)/modules_libs/java.base, \
07c3c4f1eb63 8168108: lib/classlist should be packaged in java.base.jmod
erikj
parents:
diff changeset
    82
))
07c3c4f1eb63 8168108: lib/classlist should be packaged in java.base.jmod
erikj
parents:
diff changeset
    83
07c3c4f1eb63 8168108: lib/classlist should be packaged in java.base.jmod
erikj
parents:
diff changeset
    84
TARGETS += $(COPY_CLASSLIST)
07c3c4f1eb63 8168108: lib/classlist should be packaged in java.base.jmod
erikj
parents:
diff changeset
    85
07c3c4f1eb63 8168108: lib/classlist should be packaged in java.base.jmod
erikj
parents:
diff changeset
    86
################################################################################
07c3c4f1eb63 8168108: lib/classlist should be packaged in java.base.jmod
erikj
parents:
diff changeset
    87
07c3c4f1eb63 8168108: lib/classlist should be packaged in java.base.jmod
erikj
parents:
diff changeset
    88
all: $(TARGETS)