langtools/make/gendata/Gendata-jdk.compiler.gmk
author mhaupt
Wed, 08 Jun 2016 21:45:34 +0100
changeset 39756 c50c31af8cd9
parent 36775 a9f42527ec57
child 40599 be40838eb215
permissions -rw-r--r--
8158571: Additional method handle validation Reviewed-by: jrose, ahgross, mchung
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
31506
4e07f827a794 8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff changeset
     1
#
4e07f827a794 8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff changeset
     2
# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4e07f827a794 8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff changeset
     3
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4e07f827a794 8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff changeset
     4
#
4e07f827a794 8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff changeset
     5
# This code is free software; you can redistribute it and/or modify it
4e07f827a794 8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff changeset
     6
# under the terms of the GNU General Public License version 2 only, as
4e07f827a794 8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff changeset
     7
# published by the Free Software Foundation.  Oracle designates this
4e07f827a794 8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff changeset
     8
# particular file as subject to the "Classpath" exception as provided
4e07f827a794 8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff changeset
     9
# by Oracle in the LICENSE file that accompanied this code.
4e07f827a794 8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff changeset
    10
#
4e07f827a794 8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff changeset
    11
# This code is distributed in the hope that it will be useful, but WITHOUT
4e07f827a794 8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff changeset
    12
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4e07f827a794 8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff changeset
    13
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4e07f827a794 8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff changeset
    14
# version 2 for more details (a copy is included in the LICENSE file that
4e07f827a794 8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff changeset
    15
# accompanied this code).
4e07f827a794 8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff changeset
    16
#
4e07f827a794 8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff changeset
    17
# You should have received a copy of the GNU General Public License version
4e07f827a794 8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff changeset
    18
# 2 along with this work; if not, write to the Free Software Foundation,
4e07f827a794 8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff changeset
    19
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4e07f827a794 8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff changeset
    20
#
4e07f827a794 8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff changeset
    21
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4e07f827a794 8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff changeset
    22
# or visit www.oracle.com if you need additional information or have any
4e07f827a794 8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff changeset
    23
# questions.
4e07f827a794 8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff changeset
    24
#
4e07f827a794 8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff changeset
    25
33552
5fac23e49bef 8141333: Rename SetupArchive to SetupJarArchive
ihse
parents: 31506
diff changeset
    26
include JarArchive.gmk
31506
4e07f827a794 8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff changeset
    27
include JavaCompilation.gmk
4e07f827a794 8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff changeset
    28
include SetupJavaCompilers.gmk
4e07f827a794 8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff changeset
    29
4e07f827a794 8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff changeset
    30
################################################################################
4e07f827a794 8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff changeset
    31
4e07f827a794 8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff changeset
    32
CT_DATA_DESCRIPTION ?= $(LANGTOOLS_TOPDIR)/make/data/symbols/symbols
4e07f827a794 8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff changeset
    33
4e07f827a794 8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff changeset
    34
$(eval $(call SetupJavaCompilation, COMPILE_CREATE_SYMBOLS, \
4e07f827a794 8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff changeset
    35
    SETUP := GENERATE_OLDBYTECODE, \
4e07f827a794 8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff changeset
    36
    SRC := $(LANGTOOLS_TOPDIR)/make/src/classes, \
4e07f827a794 8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff changeset
    37
    INCLUDES := build/tools/symbolgenerator, \
4e07f827a794 8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff changeset
    38
    ADD_JAVAC_FLAGS := -Xbootclasspath/p:"$(INTERIM_LANGTOOLS_JAR)", \
4e07f827a794 8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff changeset
    39
    BIN := $(BUILDTOOLS_OUTPUTDIR)/create_symbols, \
4e07f827a794 8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff changeset
    40
))
4e07f827a794 8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff changeset
    41
36526
3b41f1c69604 8142968: Module System implementation
alanb
parents: 33552
diff changeset
    42
ifeq ($(BOOT_JDK_MODULAR), true)
36775
a9f42527ec57 8153211: Convert build tool to use the new -XaddExports syntax in bootcycle build
mchung
parents: 36526
diff changeset
    43
  COMPILECREATESYMBOLS_ADD_EXPORTS := \
a9f42527ec57 8153211: Convert build tool to use the new -XaddExports syntax in bootcycle build
mchung
parents: 36526
diff changeset
    44
      -XaddExports:jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED \
a9f42527ec57 8153211: Convert build tool to use the new -XaddExports syntax in bootcycle build
mchung
parents: 36526
diff changeset
    45
      -XaddExports:jdk.compiler/com.sun.tools.javac.jvm=ALL-UNNAMED \
a9f42527ec57 8153211: Convert build tool to use the new -XaddExports syntax in bootcycle build
mchung
parents: 36526
diff changeset
    46
      -XaddExports:jdk.jdeps/com.sun.tools.classfile=ALL-UNNAMED
36526
3b41f1c69604 8142968: Module System implementation
alanb
parents: 33552
diff changeset
    47
endif
3b41f1c69604 8142968: Module System implementation
alanb
parents: 33552
diff changeset
    48
31506
4e07f827a794 8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff changeset
    49
$(SUPPORT_OUTPUTDIR)/symbols/ct.sym-files/_the.symbols: \
4e07f827a794 8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff changeset
    50
    $(COMPILE_CREATE_SYMBOLS) \
4e07f827a794 8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff changeset
    51
    $(wildcard $(LANGTOOLS_TOPDIR)/make/data/symbols/*)
4e07f827a794 8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff changeset
    52
	$(RM) -r $(@D)
4e07f827a794 8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff changeset
    53
	$(MKDIR) -p $(@D)
4e07f827a794 8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff changeset
    54
	$(ECHO) Creating ct.sym classes
4e07f827a794 8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff changeset
    55
	$(JAVA) $(INTERIM_LANGTOOLS_ARGS) \
36526
3b41f1c69604 8142968: Module System implementation
alanb
parents: 33552
diff changeset
    56
	    $(COMPILECREATESYMBOLS_ADD_EXPORTS) \
31506
4e07f827a794 8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff changeset
    57
	    -classpath $(BUILDTOOLS_OUTPUTDIR)/create_symbols \
4e07f827a794 8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff changeset
    58
	    build.tools.symbolgenerator.CreateSymbols \
4e07f827a794 8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff changeset
    59
	    build-ctsym \
4e07f827a794 8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff changeset
    60
	    $(CT_DATA_DESCRIPTION) \
4e07f827a794 8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff changeset
    61
	    $(@D)
4e07f827a794 8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff changeset
    62
	$(TOUCH) $@
4e07f827a794 8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff changeset
    63
33552
5fac23e49bef 8141333: Rename SetupArchive to SetupJarArchive
ihse
parents: 31506
diff changeset
    64
# Can't generate ct.sym directly into modules libs as the SetupJarArchive macro
31506
4e07f827a794 8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff changeset
    65
# creates meta data files in the output dir.
33552
5fac23e49bef 8141333: Rename SetupArchive to SetupJarArchive
ihse
parents: 31506
diff changeset
    66
$(eval $(call SetupJarArchive, CREATE_CTSYM, \
31506
4e07f827a794 8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff changeset
    67
    DEPENDENCIES := $(SUPPORT_OUTPUTDIR)/symbols/ct.sym-files/_the.symbols, \
4e07f827a794 8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff changeset
    68
    SRCS := $(SUPPORT_OUTPUTDIR)/symbols/ct.sym-files, \
4e07f827a794 8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff changeset
    69
    SUFFIXES := .sig, \
4e07f827a794 8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff changeset
    70
    JAR := $(SUPPORT_OUTPUTDIR)/symbols/ct.sym, \
4e07f827a794 8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff changeset
    71
))
4e07f827a794 8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff changeset
    72
4e07f827a794 8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff changeset
    73
# Copy ct.sym to the modules libs dir
4e07f827a794 8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff changeset
    74
$(eval $(call SetupCopyFiles, COPY_TO_LIBS, \
4e07f827a794 8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff changeset
    75
    FILES := $(SUPPORT_OUTPUTDIR)/symbols/ct.sym, \
4e07f827a794 8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff changeset
    76
    DEST := $(SUPPORT_OUTPUTDIR)/modules_libs/jdk.compiler, \
4e07f827a794 8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff changeset
    77
))
4e07f827a794 8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff changeset
    78
4e07f827a794 8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff changeset
    79
TARGETS += $(CREATE_CTSYM) $(COPY_TO_LIBS)
4e07f827a794 8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff changeset
    80
4e07f827a794 8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff changeset
    81
################################################################################