make/gendata/Gendata-jdk.compiler.gmk
author alanb
Fri, 13 Oct 2017 14:17:10 +0100
changeset 47335 e8bd8e969070
parent 47217 72e3ae9a25eb
child 47364 6b3389375f31
permissions -rw-r--r--
8186738: (sl) ServiceLoader::stream doesn't update cache Reviewed-by: 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
#
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
47217
72e3ae9a25eb 8187444: Forest Consolidation: Make build work
erikj
parents: 47216
diff changeset
    42
CT_DATA_DESCRIPTION ?= $(TOPDIR)/make/data/symbols/symbols
31506
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, \
47217
72e3ae9a25eb 8187444: Forest Consolidation: Make build work
erikj
parents: 47216
diff changeset
    46
    SRC := $(TOPDIR)/make/langtools/src/classes, \
31506
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) \
47217
72e3ae9a25eb 8187444: Forest Consolidation: Make build work
erikj
parents: 47216
diff changeset
    63
    $(wildcard $(TOPDIR)/make/data/symbols/*) \
45909
b9bec21c56f6 8181298: Assertion failure in com.sun.tools.javac.comp.Modules
jlahoda
parents: 45156
diff changeset
    64
    $(MODULE_INFOS)
31506
4e07f827a794 8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff changeset
    65
	$(RM) -r $(@D)
4e07f827a794 8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff changeset
    66
	$(MKDIR) -p $(@D)
4e07f827a794 8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff changeset
    67
	$(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
    68
	$(JAVA_SMALL) $(INTERIM_LANGTOOLS_ARGS) \
36526
3b41f1c69604 8142968: Module System implementation
alanb
parents: 33552
diff changeset
    69
	    $(COMPILECREATESYMBOLS_ADD_EXPORTS) \
31506
4e07f827a794 8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff changeset
    70
	    -classpath $(BUILDTOOLS_OUTPUTDIR)/create_symbols \
4e07f827a794 8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff changeset
    71
	    build.tools.symbolgenerator.CreateSymbols \
4e07f827a794 8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff changeset
    72
	    build-ctsym \
4e07f827a794 8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff changeset
    73
	    $(CT_DATA_DESCRIPTION) \
4e07f827a794 8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff changeset
    74
	    $(@D)
45156
001f73134346 8178152: Handling of incubating modules, the jdk.unsupported module and --add-exports with --release <current>
jlahoda
parents: 41253
diff changeset
    75
	$(MKDIR) $(@D)/9
001f73134346 8178152: Handling of incubating modules, the jdk.unsupported module and --add-exports with --release <current>
jlahoda
parents: 41253
diff changeset
    76
	$(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
    77
	    $(COMPILECREATESYMBOLS_ADD_EXPORTS) \
001f73134346 8178152: Handling of incubating modules, the jdk.unsupported module and --add-exports with --release <current>
jlahoda
parents: 41253
diff changeset
    78
	    -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
    79
	    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
    80
	    $(CT_MODULESOURCEPATH) \
001f73134346 8178152: Handling of incubating modules, the jdk.unsupported module and --add-exports with --release <current>
jlahoda
parents: 41253
diff changeset
    81
	    $(CT_MODULES) \
001f73134346 8178152: Handling of incubating modules, the jdk.unsupported module and --add-exports with --release <current>
jlahoda
parents: 41253
diff changeset
    82
	    >$(@D)/9/system-modules
31506
4e07f827a794 8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff changeset
    83
	$(TOUCH) $@
4e07f827a794 8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff changeset
    84
33552
5fac23e49bef 8141333: Rename SetupArchive to SetupJarArchive
ihse
parents: 31506
diff changeset
    85
# 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
    86
# creates meta data files in the output dir.
33552
5fac23e49bef 8141333: Rename SetupArchive to SetupJarArchive
ihse
parents: 31506
diff changeset
    87
$(eval $(call SetupJarArchive, CREATE_CTSYM, \
31506
4e07f827a794 8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff changeset
    88
    DEPENDENCIES := $(SUPPORT_OUTPUTDIR)/symbols/ct.sym-files/_the.symbols, \
4e07f827a794 8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff changeset
    89
    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
    90
    SUFFIXES := .sig system-modules, \
31506
4e07f827a794 8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff changeset
    91
    JAR := $(SUPPORT_OUTPUTDIR)/symbols/ct.sym, \
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
4e07f827a794 8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff changeset
    94
# Copy ct.sym to the modules libs dir
4e07f827a794 8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff changeset
    95
$(eval $(call SetupCopyFiles, COPY_TO_LIBS, \
4e07f827a794 8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff changeset
    96
    FILES := $(SUPPORT_OUTPUTDIR)/symbols/ct.sym, \
4e07f827a794 8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff changeset
    97
    DEST := $(SUPPORT_OUTPUTDIR)/modules_libs/jdk.compiler, \
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
4e07f827a794 8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff changeset
   100
TARGETS += $(CREATE_CTSYM) $(COPY_TO_LIBS)
4e07f827a794 8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff changeset
   101
4e07f827a794 8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff changeset
   102
################################################################################