32 |
32 |
33 # The BOOT_JAVAC setup uses the bootdir compiler to compile the tools |
33 # The BOOT_JAVAC setup uses the bootdir compiler to compile the tools |
34 # and the bootstrap javac, to be run by the bootdir jvm. |
34 # and the bootstrap javac, to be run by the bootdir jvm. |
35 $(eval $(call SetupJavaCompiler,BOOT_JAVAC,\ |
35 $(eval $(call SetupJavaCompiler,BOOT_JAVAC,\ |
36 JAVAC:=$(JAVAC),\ |
36 JAVAC:=$(JAVAC),\ |
37 FLAGS:=-Xprefer:source -XDignore.symbol.file=true -g,\ |
37 SERVER_DIR:=$(SJAVAC_SERVER_DIR),\ |
38 MODE:=SINGLE_THREADED_BATCH)) |
38 SERVER_JVM:=$(SJAVAC_SERVER_JAVA),\ |
|
39 FLAGS:=-XDignore.symbol.file=true -g -Xlint:all$(COMMA)-deprecation -Werror)) |
39 |
40 |
40 # Now setup the compilation of the properties compilation tool. You can depend |
41 # Now setup the compilation of the properties compilation tool. You can depend |
41 # upon $(BUILD_TOOLS) to trigger a compilation of the tools. Note that we |
42 # upon $(BUILD_TOOLS) to trigger a compilation of the tools. Note that we |
42 # add src/share/classes to the sourcepath. This is necessary since the GenStubs |
43 # add src/share/classes to the sourcepath. This is necessary since the GenStubs |
43 # program needs to be linked and run towards the new javac sources. |
44 # program needs to be linked and run towards the new javac sources. |
44 $(eval $(call SetupJavaCompilation,BUILD_TOOLS,\ |
45 $(eval $(call SetupJavaCompilation,BUILD_TOOLS,\ |
45 SETUP:=BOOT_JAVAC,\ |
46 SETUP:=BOOT_JAVAC,\ |
|
47 DISABLE_SJAVAC:=true,\ |
|
48 ADD_JAVAC_FLAGS:=-Xprefer:source,\ |
46 SRC:=$(LANGTOOLS_TOPDIR)/make/tools $(LANGTOOLS_TOPDIR)/src/share/classes,\ |
49 SRC:=$(LANGTOOLS_TOPDIR)/make/tools $(LANGTOOLS_TOPDIR)/src/share/classes,\ |
47 INCLUDES:=compileproperties genstubs,\ |
50 INCLUDES:=compileproperties genstubs,\ |
48 BIN:=$(LANGTOOLS_OUTPUTDIR)/btclasses)) |
51 BIN:=$(LANGTOOLS_OUTPUTDIR)/btclasses)) |
49 |
52 |
50 # The compileprops tools compiles a properties file into a resource bundle. |
53 # The compileprops tools compiles a properties file into a resource bundle. |
91 # Setup the rules to build a dist/bootstrap/lib/javac.jar, ie a smaller intermediate javac |
94 # Setup the rules to build a dist/bootstrap/lib/javac.jar, ie a smaller intermediate javac |
92 # that can be compiled with an old javac. The intermediate javac is then used |
95 # that can be compiled with an old javac. The intermediate javac is then used |
93 # to compile javac again and to build the complete new jdk. |
96 # to compile javac again and to build the complete new jdk. |
94 $(eval $(call SetupJavaCompilation,BUILD_BOOTSTRAP_LANGTOOLS,\ |
97 $(eval $(call SetupJavaCompilation,BUILD_BOOTSTRAP_LANGTOOLS,\ |
95 SETUP:=BOOT_JAVAC,\ |
98 SETUP:=BOOT_JAVAC,\ |
|
99 DISABLE_SJAVAC:=true,\ |
96 SRC:=$(LANGTOOLS_TOPDIR)/src/share/classes $(LANGTOOLS_OUTPUTDIR)/gensrc,\ |
100 SRC:=$(LANGTOOLS_TOPDIR)/src/share/classes $(LANGTOOLS_OUTPUTDIR)/gensrc,\ |
97 EXCLUDES:=com/sun/tools/javac/nio,\ |
101 EXCLUDES:=com/sun/tools/javac/nio,\ |
98 BIN:=$(LANGTOOLS_OUTPUTDIR)/btclasses/bootstrap)) |
102 BIN:=$(LANGTOOLS_OUTPUTDIR)/btclasses/bootstrap)) |
99 |
103 |
100 $(eval $(call SetupArchive,ARCHIVE_BOOTSTRAP_JAVAC,$(BUILD_BOOTSTRAP_LANGTOOLS),\ |
104 $(eval $(call SetupArchive,ARCHIVE_BOOTSTRAP_JAVAC,$(BUILD_BOOTSTRAP_LANGTOOLS),\ |
120 # GenStubs is used to bootstrap any dependencies from javac to the new JDK that is not |
124 # GenStubs is used to bootstrap any dependencies from javac to the new JDK that is not |
121 # yet built. It is currently not needed but might be again in the future. The following |
125 # yet built. It is currently not needed but might be again in the future. The following |
122 # exercises the functionality to verify that it works. |
126 # exercises the functionality to verify that it works. |
123 TOOL_GENSTUBS_CMD=$(JAVA) \ |
127 TOOL_GENSTUBS_CMD=$(JAVA) \ |
124 "-Xbootclasspath/p:$(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javac.jar" \ |
128 "-Xbootclasspath/p:$(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javac.jar" \ |
125 -cp "$(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javac.jar$(PATH_SEP)$(LANGTOOLS_OUTPUTDIR)/btclasses" \ |
129 -classpath $(LANGTOOLS_OUTPUTDIR)/btclasses \ |
126 genstubs.GenStubs |
130 genstubs.GenStubs |
127 # We fetch source from the JDK... |
131 # We fetch source from the JDK... |
128 JDKS=$(JDK_TOPDIR)/src/share/classes |
132 JDKS=$(JDK_TOPDIR)/src/share/classes |
129 # Build the list of classes to generate stubs from. java/util/Objects.java isn't |
133 # Build the list of classes to generate stubs from. java/util/Objects.java isn't |
130 # currently needed, but is used as a demo for now. |
134 # currently needed, but is used as a demo for now. |
162 # The code compiled by this compiler setup, cannot necessarily be run with the bootstrap jvm. |
166 # The code compiled by this compiler setup, cannot necessarily be run with the bootstrap jvm. |
163 $(eval $(call SetupJavaCompiler,GENERATE_NEWBYTECODE,\ |
167 $(eval $(call SetupJavaCompiler,GENERATE_NEWBYTECODE,\ |
164 JVM:=$(JAVA),\ |
168 JVM:=$(JAVA),\ |
165 JAVAC:="-Xbootclasspath/p:$(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javac.jar" \ |
169 JAVAC:="-Xbootclasspath/p:$(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javac.jar" \ |
166 -jar $(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javac.jar,\ |
170 -jar $(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javac.jar,\ |
167 FLAGS:=-Xprefer:source -XDignore.symbol.file=true,\ |
171 FLAGS:=-XDignore.symbol.file=true -Xlint:all$(COMMA)-deprecation -Werror,\ |
168 SERVER_DIR:=$(JAVAC_SERVERS),\ |
172 SERVER_DIR:=$(SJAVAC_SERVER_DIR),\ |
169 SERVER_JVM:=$(SERVER_JAVA),\ |
173 SERVER_JVM:=$(SJAVAC_SERVER_JAVA))) |
170 MODE:=$(JAVAC_USE_MODE),\ |
|
171 USE_DEPS:=$(JAVAC_USE_DEPS))) |
|
172 |
174 |
173 # javax.tools.JavaCompilerTool isn't really a suffix but this gets the file copied. |
175 # javax.tools.JavaCompilerTool isn't really a suffix but this gets the file copied. |
174 RESOURCE_SUFFIXES:=.gif .xml .css javax.tools.JavaCompilerTool |
176 RESOURCE_SUFFIXES:=.gif .xml .css javax.tools.JavaCompilerTool |
175 |
177 |
176 $(eval $(call SetupJavaCompilation,BUILD_FULL_JAVAC,\ |
178 $(eval $(call SetupJavaCompilation,BUILD_FULL_JAVAC,\ |