author | naoto |
Wed, 14 Nov 2018 11:42:40 -0800 | |
changeset 52560 | f5011100c920 |
parent 51799 | 3fabe59fe4de |
permissions | -rw-r--r-- |
31506
4e07f827a794
8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff
changeset
|
1 |
# |
50027 | 2 |
# Copyright (c) 2015, 2018, 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 | 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 |
|
47703 | 33 |
# Hook to include the corresponding custom file, if present. |
34 |
$(eval $(call IncludeCustomExtension, gendata/Gendata-jdk.compiler-pre.gmk)) |
|
35 |
||
45156
001f73134346
8178152: Handling of incubating modules, the jdk.unsupported module and --add-exports with --release <current>
jlahoda
parents:
41253
diff
changeset
|
36 |
# 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
|
37 |
$(eval $(call ReadImportMetaData)) |
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 |
# 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
|
40 |
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
|
41 |
|
001f73134346
8178152: Handling of incubating modules, the jdk.unsupported module and --add-exports with --release <current>
jlahoda
parents:
41253
diff
changeset
|
42 |
# 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
|
43 |
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
|
44 |
|
51799 | 45 |
CT_DATA_DESCRIPTION += $(TOPDIR)/make/data/symbols/symbols |
31506
4e07f827a794
8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff
changeset
|
46 |
|
47364 | 47 |
COMPILECREATESYMBOLS_ADD_EXPORTS := \ |
48 |
--add-exports jdk.compiler.interim/com.sun.tools.javac.api=ALL-UNNAMED \ |
|
49 |
--add-exports jdk.compiler.interim/com.sun.tools.javac.code=ALL-UNNAMED \ |
|
50 |
--add-exports jdk.compiler.interim/com.sun.tools.javac.util=ALL-UNNAMED \ |
|
51 |
--add-exports jdk.compiler.interim/com.sun.tools.javac.jvm=ALL-UNNAMED \ |
|
52 |
# |
|
53 |
||
31506
4e07f827a794
8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff
changeset
|
54 |
$(eval $(call SetupJavaCompilation, COMPILE_CREATE_SYMBOLS, \ |
4e07f827a794
8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff
changeset
|
55 |
SETUP := GENERATE_OLDBYTECODE, \ |
47989
f1ad41a05fb7
8191942: Replace jdeps use of jdk.internal.util.jar.VersionedStream with new public API
mchung
parents:
47703
diff
changeset
|
56 |
SRC := $(TOPDIR)/make/langtools/src/classes \ |
f1ad41a05fb7
8191942: Replace jdeps use of jdk.internal.util.jar.VersionedStream with new public API
mchung
parents:
47703
diff
changeset
|
57 |
$(TOPDIR)/src/jdk.jdeps/share/classes, \ |
f1ad41a05fb7
8191942: Replace jdeps use of jdk.internal.util.jar.VersionedStream with new public API
mchung
parents:
47703
diff
changeset
|
58 |
INCLUDES := build/tools/symbolgenerator com/sun/tools/classfile, \ |
31506
4e07f827a794
8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff
changeset
|
59 |
BIN := $(BUILDTOOLS_OUTPUTDIR)/create_symbols, \ |
47364 | 60 |
ADD_JAVAC_FLAGS := $(INTERIM_LANGTOOLS_ARGS) \ |
61 |
$(COMPILECREATESYMBOLS_ADD_EXPORTS), \ |
|
31506
4e07f827a794
8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff
changeset
|
62 |
)) |
4e07f827a794
8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff
changeset
|
63 |
|
4e07f827a794
8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff
changeset
|
64 |
$(SUPPORT_OUTPUTDIR)/symbols/ct.sym-files/_the.symbols: \ |
4e07f827a794
8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff
changeset
|
65 |
$(COMPILE_CREATE_SYMBOLS) \ |
47217 | 66 |
$(wildcard $(TOPDIR)/make/data/symbols/*) \ |
45909
b9bec21c56f6
8181298: Assertion failure in com.sun.tools.javac.comp.Modules
jlahoda
parents:
45156
diff
changeset
|
67 |
$(MODULE_INFOS) |
31506
4e07f827a794
8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff
changeset
|
68 |
$(RM) -r $(@D) |
4e07f827a794
8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff
changeset
|
69 |
$(MKDIR) -p $(@D) |
4e07f827a794
8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff
changeset
|
70 |
$(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
|
71 |
$(JAVA_SMALL) $(INTERIM_LANGTOOLS_ARGS) \ |
36526 | 72 |
$(COMPILECREATESYMBOLS_ADD_EXPORTS) \ |
31506
4e07f827a794
8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff
changeset
|
73 |
-classpath $(BUILDTOOLS_OUTPUTDIR)/create_symbols \ |
4e07f827a794
8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff
changeset
|
74 |
build.tools.symbolgenerator.CreateSymbols \ |
4e07f827a794
8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff
changeset
|
75 |
build-ctsym \ |
4e07f827a794
8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff
changeset
|
76 |
$(CT_DATA_DESCRIPTION) \ |
4e07f827a794
8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff
changeset
|
77 |
$(@D) |
45156
001f73134346
8178152: Handling of incubating modules, the jdk.unsupported module and --add-exports with --release <current>
jlahoda
parents:
41253
diff
changeset
|
78 |
$(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
|
79 |
$(COMPILECREATESYMBOLS_ADD_EXPORTS) \ |
001f73134346
8178152: Handling of incubating modules, the jdk.unsupported module and --add-exports with --release <current>
jlahoda
parents:
41253
diff
changeset
|
80 |
-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
|
81 |
build.tools.symbolgenerator.TransitiveDependencies \ |
50027 | 82 |
$(@D) \ |
45156
001f73134346
8178152: Handling of incubating modules, the jdk.unsupported module and --add-exports with --release <current>
jlahoda
parents:
41253
diff
changeset
|
83 |
$(CT_MODULESOURCEPATH) \ |
50027 | 84 |
$(CT_MODULES) |
31506
4e07f827a794
8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff
changeset
|
85 |
$(TOUCH) $@ |
4e07f827a794
8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff
changeset
|
86 |
|
33552 | 87 |
# 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
|
88 |
# creates meta data files in the output dir. |
33552 | 89 |
$(eval $(call SetupJarArchive, CREATE_CTSYM, \ |
31506
4e07f827a794
8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff
changeset
|
90 |
DEPENDENCIES := $(SUPPORT_OUTPUTDIR)/symbols/ct.sym-files/_the.symbols, \ |
4e07f827a794
8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff
changeset
|
91 |
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
|
92 |
SUFFIXES := .sig system-modules, \ |
31506
4e07f827a794
8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff
changeset
|
93 |
JAR := $(SUPPORT_OUTPUTDIR)/symbols/ct.sym, \ |
4e07f827a794
8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff
changeset
|
94 |
)) |
4e07f827a794
8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff
changeset
|
95 |
|
4e07f827a794
8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff
changeset
|
96 |
# Copy ct.sym to the modules libs dir |
4e07f827a794
8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff
changeset
|
97 |
$(eval $(call SetupCopyFiles, COPY_TO_LIBS, \ |
4e07f827a794
8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff
changeset
|
98 |
FILES := $(SUPPORT_OUTPUTDIR)/symbols/ct.sym, \ |
4e07f827a794
8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff
changeset
|
99 |
DEST := $(SUPPORT_OUTPUTDIR)/modules_libs/jdk.compiler, \ |
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 |
|
4e07f827a794
8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff
changeset
|
102 |
TARGETS += $(CREATE_CTSYM) $(COPY_TO_LIBS) |
4e07f827a794
8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff
changeset
|
103 |
|
4e07f827a794
8072480: javac should support compilation for a specific platform version
jlahoda
parents:
diff
changeset
|
104 |
################################################################################ |