langtools/make/gendata/Gendata-jdk.compiler.gmk
author jlahoda
Fri, 12 May 2017 06:42:37 +0200
changeset 45156 001f73134346
parent 41253 7a2422a5b481
child 45909 b9bec21c56f6
permissions -rw-r--r--
8178152: Handling of incubating modules, the jdk.unsupported module and --add-exports with --release <current> Summary: --release 9 should only allow documented modules; --add-exports/--add-reads/--patch-module should not be allowed on system modules when --release 9 is used. Reviewed-by: jjg, erikj, ihse
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
#
40599
be40838eb215 8164887: update tests to remove use of old-style options
jjg
parents: 36775
diff changeset
     2
# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
31506
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
45156
001f73134346 8178152: Handling of incubating modules, the jdk.unsupported module and --add-exports with --release <current>
jlahoda
parents: 41253
diff changeset
    28
include Modules.gmk
31506
4e07f827a794 8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff changeset
    29
include SetupJavaCompilers.gmk
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
45156
001f73134346 8178152: Handling of incubating modules, the jdk.unsupported module and --add-exports with --release <current>
jlahoda
parents: 41253
diff changeset
    33
# This is needed to properly setup DOCS_MODULES.
001f73134346 8178152: Handling of incubating modules, the jdk.unsupported module and --add-exports with --release <current>
jlahoda
parents: 41253
diff changeset
    34
$(eval $(call ReadImportMetaData))
001f73134346 8178152: Handling of incubating modules, the jdk.unsupported module and --add-exports with --release <current>
jlahoda
parents: 41253
diff changeset
    35
001f73134346 8178152: Handling of incubating modules, the jdk.unsupported module and --add-exports with --release <current>
jlahoda
parents: 41253
diff changeset
    36
# Modules that should be visible for 9 - the documented modules:
001f73134346 8178152: Handling of incubating modules, the jdk.unsupported module and --add-exports with --release <current>
jlahoda
parents: 41253
diff changeset
    37
CT_MODULES := $(DOCS_MODULES)
001f73134346 8178152: Handling of incubating modules, the jdk.unsupported module and --add-exports with --release <current>
jlahoda
parents: 41253
diff changeset
    38
001f73134346 8178152: Handling of incubating modules, the jdk.unsupported module and --add-exports with --release <current>
jlahoda
parents: 41253
diff changeset
    39
# Get the complete module source path:
001f73134346 8178152: Handling of incubating modules, the jdk.unsupported module and --add-exports with --release <current>
jlahoda
parents: 41253
diff changeset
    40
CT_MODULESOURCEPATH := $(call GetModuleSrcPath)
001f73134346 8178152: Handling of incubating modules, the jdk.unsupported module and --add-exports with --release <current>
jlahoda
parents: 41253
diff changeset
    41
31506
4e07f827a794 8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff changeset
    42
CT_DATA_DESCRIPTION ?= $(LANGTOOLS_TOPDIR)/make/data/symbols/symbols
4e07f827a794 8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff changeset
    43
4e07f827a794 8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff changeset
    44
$(eval $(call SetupJavaCompilation, COMPILE_CREATE_SYMBOLS, \
4e07f827a794 8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff changeset
    45
    SETUP := GENERATE_OLDBYTECODE, \
4e07f827a794 8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff changeset
    46
    SRC := $(LANGTOOLS_TOPDIR)/make/src/classes, \
4e07f827a794 8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff changeset
    47
    INCLUDES := build/tools/symbolgenerator, \
4e07f827a794 8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff changeset
    48
    ADD_JAVAC_FLAGS := -Xbootclasspath/p:"$(INTERIM_LANGTOOLS_JAR)", \
4e07f827a794 8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff changeset
    49
    BIN := $(BUILDTOOLS_OUTPUTDIR)/create_symbols, \
4e07f827a794 8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff changeset
    50
))
4e07f827a794 8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff changeset
    51
36526
3b41f1c69604 8142968: Module System implementation
alanb
parents: 33552
diff changeset
    52
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
    53
  COMPILECREATESYMBOLS_ADD_EXPORTS := \
45156
001f73134346 8178152: Handling of incubating modules, the jdk.unsupported module and --add-exports with --release <current>
jlahoda
parents: 41253
diff changeset
    54
      --add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED \
001f73134346 8178152: Handling of incubating modules, the jdk.unsupported module and --add-exports with --release <current>
jlahoda
parents: 41253
diff changeset
    55
      --add-exports=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED \
40599
be40838eb215 8164887: update tests to remove use of old-style options
jjg
parents: 36775
diff changeset
    56
      --add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED \
be40838eb215 8164887: update tests to remove use of old-style options
jjg
parents: 36775
diff changeset
    57
      --add-exports=jdk.compiler/com.sun.tools.javac.jvm=ALL-UNNAMED \
be40838eb215 8164887: update tests to remove use of old-style options
jjg
parents: 36775
diff changeset
    58
      --add-exports=jdk.jdeps/com.sun.tools.classfile=ALL-UNNAMED
36526
3b41f1c69604 8142968: Module System implementation
alanb
parents: 33552
diff changeset
    59
endif
3b41f1c69604 8142968: Module System implementation
alanb
parents: 33552
diff changeset
    60
31506
4e07f827a794 8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff changeset
    61
$(SUPPORT_OUTPUTDIR)/symbols/ct.sym-files/_the.symbols: \
4e07f827a794 8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff changeset
    62
    $(COMPILE_CREATE_SYMBOLS) \
4e07f827a794 8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff changeset
    63
    $(wildcard $(LANGTOOLS_TOPDIR)/make/data/symbols/*)
4e07f827a794 8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff changeset
    64
	$(RM) -r $(@D)
4e07f827a794 8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff changeset
    65
	$(MKDIR) -p $(@D)
4e07f827a794 8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff changeset
    66
	$(ECHO) Creating ct.sym classes
41253
7a2422a5b481 8166965: Some small java build tools are still running with big JVM configuration
erikj
parents: 40599
diff changeset
    67
	$(JAVA_SMALL) $(INTERIM_LANGTOOLS_ARGS) \
36526
3b41f1c69604 8142968: Module System implementation
alanb
parents: 33552
diff changeset
    68
	    $(COMPILECREATESYMBOLS_ADD_EXPORTS) \
31506
4e07f827a794 8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff changeset
    69
	    -classpath $(BUILDTOOLS_OUTPUTDIR)/create_symbols \
4e07f827a794 8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff changeset
    70
	    build.tools.symbolgenerator.CreateSymbols \
4e07f827a794 8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff changeset
    71
	    build-ctsym \
4e07f827a794 8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff changeset
    72
	    $(CT_DATA_DESCRIPTION) \
4e07f827a794 8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff changeset
    73
	    $(@D)
45156
001f73134346 8178152: Handling of incubating modules, the jdk.unsupported module and --add-exports with --release <current>
jlahoda
parents: 41253
diff changeset
    74
	$(MKDIR) $(@D)/9
001f73134346 8178152: Handling of incubating modules, the jdk.unsupported module and --add-exports with --release <current>
jlahoda
parents: 41253
diff changeset
    75
	$(JAVA_SMALL) $(INTERIM_LANGTOOLS_ARGS) \
001f73134346 8178152: Handling of incubating modules, the jdk.unsupported module and --add-exports with --release <current>
jlahoda
parents: 41253
diff changeset
    76
	    $(COMPILECREATESYMBOLS_ADD_EXPORTS) \
001f73134346 8178152: Handling of incubating modules, the jdk.unsupported module and --add-exports with --release <current>
jlahoda
parents: 41253
diff changeset
    77
	    -classpath $(BUILDTOOLS_OUTPUTDIR)/create_symbols \
001f73134346 8178152: Handling of incubating modules, the jdk.unsupported module and --add-exports with --release <current>
jlahoda
parents: 41253
diff changeset
    78
	    build.tools.symbolgenerator.TransitiveDependencies \
001f73134346 8178152: Handling of incubating modules, the jdk.unsupported module and --add-exports with --release <current>
jlahoda
parents: 41253
diff changeset
    79
	    $(CT_MODULESOURCEPATH) \
001f73134346 8178152: Handling of incubating modules, the jdk.unsupported module and --add-exports with --release <current>
jlahoda
parents: 41253
diff changeset
    80
	    $(CT_MODULES) \
001f73134346 8178152: Handling of incubating modules, the jdk.unsupported module and --add-exports with --release <current>
jlahoda
parents: 41253
diff changeset
    81
	    >$(@D)/9/system-modules
31506
4e07f827a794 8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff changeset
    82
	$(TOUCH) $@
4e07f827a794 8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff changeset
    83
33552
5fac23e49bef 8141333: Rename SetupArchive to SetupJarArchive
ihse
parents: 31506
diff changeset
    84
# 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
    85
# creates meta data files in the output dir.
33552
5fac23e49bef 8141333: Rename SetupArchive to SetupJarArchive
ihse
parents: 31506
diff changeset
    86
$(eval $(call SetupJarArchive, CREATE_CTSYM, \
31506
4e07f827a794 8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff changeset
    87
    DEPENDENCIES := $(SUPPORT_OUTPUTDIR)/symbols/ct.sym-files/_the.symbols, \
4e07f827a794 8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff changeset
    88
    SRCS := $(SUPPORT_OUTPUTDIR)/symbols/ct.sym-files, \
45156
001f73134346 8178152: Handling of incubating modules, the jdk.unsupported module and --add-exports with --release <current>
jlahoda
parents: 41253
diff changeset
    89
    SUFFIXES := .sig system-modules, \
31506
4e07f827a794 8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff changeset
    90
    JAR := $(SUPPORT_OUTPUTDIR)/symbols/ct.sym, \
4e07f827a794 8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff changeset
    91
))
4e07f827a794 8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff changeset
    92
4e07f827a794 8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff changeset
    93
# Copy ct.sym to the modules libs dir
4e07f827a794 8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff changeset
    94
$(eval $(call SetupCopyFiles, COPY_TO_LIBS, \
4e07f827a794 8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff changeset
    95
    FILES := $(SUPPORT_OUTPUTDIR)/symbols/ct.sym, \
4e07f827a794 8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff changeset
    96
    DEST := $(SUPPORT_OUTPUTDIR)/modules_libs/jdk.compiler, \
4e07f827a794 8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff changeset
    97
))
4e07f827a794 8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff changeset
    98
4e07f827a794 8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff changeset
    99
TARGETS += $(CREATE_CTSYM) $(COPY_TO_LIBS)
4e07f827a794 8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff changeset
   100
4e07f827a794 8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff changeset
   101
################################################################################