38 # Suspect this may not be needed anymore.
39 JAVA_MEM_FLAGS += -Xms$(MAX_VM_MEMORY)m -XX:-Inline
40 else
41 JAVA_MEM_FLAGS += -Xms$(MIN_VM_MEMORY)m -XX:PermSize=32m -XX:MaxPermSize=160m
42 endif
43
44 #
45 # All java tools (javac, javah, and javadoc) run faster with certain java
46 # options, this macro should be used with all these tools.
47 # In particular, the client VM makes these tools run faster when
48 # it's available.
49 #
50 ADD_CLIENT_VM_OPTION = false
51 ifeq ($(PLATFORM), solaris)
52 ADD_CLIENT_VM_OPTION = true
53 else
54 ifeq ($(ARCH_DATA_MODEL), 32)
55 ADD_CLIENT_VM_OPTION = true
56 endif
57 endif
58 JAVA_JVM_FLAGS =
59 ifeq ($(ADD_CLIENT_VM_OPTION), true)
60 JAVA_JVM_FLAGS += -client
61 endif
62
63 # Various VM flags
64 JAVA_TOOLS_FLAGS = $(JAVA_JVM_FLAGS) $(JAVA_MEM_FLAGS)
65
66 # The VM flags for javac
67 JAVAC_JVM_FLAGS =
68
69 # 64-bit builds require a larger thread stack size.
70 ifeq ($(ARCH_DATA_MODEL), 32)
71 JAVAC_JVM_FLAGS += -J-XX:ThreadStackSize=768
72 else
73 JAVAC_JVM_FLAGS += -J-XX:ThreadStackSize=1536
74 endif
75 JAVAC_JVM_FLAGS += $(JAVA_TOOLS_FLAGS:%=-J%)
76
77 # The jar -J options are special, must be added at the end of the command line
78 JAR_JFLAGS = $(JAVA_TOOLS_FLAGS:%=-J%)
79
80 # JAVA_TOOLS_DIR is the default location to find Java tools to run, if
81 # langtools is not available.
83 ifndef JAVA_TOOLS_DIR
84 JAVA_TOOLS_DIR = $(JDK_IMPORT_PATH)/bin
85 endif
86
87 #
88 # Invoking the Java compiler. In leaf makefiles, choose as follows:
89 # -- Use JAVAC if you want to take full control of what options get
90 # passed to javac.
91 # -- Use JAVAC_CMD if you want to take the defaults given to you.
92 #
93
94 ifndef DEBUG_CLASSFILES
95 ifeq ($(VARIANT), DBG)
96 DEBUG_CLASSFILES = true
97 endif
98 endif
99 JAVACFLAGS =
100 ifeq ($(DEBUG_CLASSFILES),true)
101 JAVACFLAGS += -g
102 endif
103 ifeq ($(COMPILER_WARNINGS_FATAL), true)
104 JAVACFLAGS += -Werror
105 endif
106
107 NO_PROPRIETARY_API_WARNINGS = -XDignore.symbol.file=true
108 JAVACFLAGS += $(NO_PROPRIETARY_API_WARNINGS)
109
110 # Add the source level
111 LANGUAGE_VERSION = -source 7
112 JAVACFLAGS += $(LANGUAGE_VERSION)
113
114 # Add the class version we want
115 TARGET_CLASS_VERSION = 7
116 CLASS_VERSION = -target $(TARGET_CLASS_VERSION)
117 JAVACFLAGS += $(CLASS_VERSION)
118 JAVACFLAGS += -encoding ascii
119 JAVACFLAGS += -classpath $(BOOTDIR)/lib/tools.jar
120 JAVACFLAGS += $(OTHER_JAVACFLAGS)
121
122 # Needed for javah
123 JAVAHFLAGS += -classpath $(CLASSBINDIR)
124
125 # Langtools
126 ifdef LANGTOOLS_DIST
127 JAVAC_JAR = $(LANGTOOLS_DIST)/bootstrap/lib/javac.jar
128 JAVAH_JAR = $(LANGTOOLS_DIST)/bootstrap/lib/javah.jar
129 JAVADOC_JAR = $(LANGTOOLS_DIST)/bootstrap/lib/javadoc.jar
130 DOCLETS_JAR = $(LANGTOOLS_DIST)/bootstrap/lib/doclets.jar
131 JAVAC_CMD = $(BOOT_JAVA_CMD) \
159 #
160 # The javac supplied with the LANGTOOLS_DIST should be used to build the
161 # classes that will be put into the built jdk. But note that this javac
162 # will use the ALT_BOOTDIR java runtime. Any classes created by the
163 # LANGTOOLS_DIST javac should not be run during this jdk build and indeed
164 # may not even run with the ALT_BOOTDIR jdk because they may be a newer
165 # class file version that the ALT_BOOTDIR jdk doesn't understand.
166 #
167 # The important observation here is that the built jdk is NOT run during
168 # the build. If the built jdk needs to be verified that it can build this
169 # same jdk, then it should be supplied to the build process as the ALT_BOOTDIR
170 # jdk, and this resulting built jdk should be compared to the first one.
171 # (They should be the same). Re-using this built jdk as the ALT_BOOTDIR
172 # jdk will be the only way and the recommeneded way to verify the built jdk
173 # can bootstrap itself.
174 #
175
176 # The javac options supplied to the boot javac is limited. This compiler
177 # should only be used to build the 'make/tools' sources, which are not
178 # class files that end up in the classes directory.
179 ifeq ($(COMPILER_WARNINGS_FATAL), true)
180 BOOT_JAVACFLAGS += -Werror
181 endif
182 BOOT_SOURCE_LANGUAGE_VERSION = 6
183 BOOT_TARGET_CLASS_VERSION = 6
184 BOOT_JAVACFLAGS += -encoding ascii -source $(BOOT_SOURCE_LANGUAGE_VERSION) -target $(BOOT_TARGET_CLASS_VERSION)
185
186 BOOT_JAVA_CMD = $(BOOTDIR)/bin/java $(JAVA_TOOLS_FLAGS)
187 BOOT_JAVAC_CMD = $(BOOTDIR)/bin/javac $(JAVAC_JVM_FLAGS) $(BOOT_JAVACFLAGS)
188 BOOT_JAR_CMD = $(BOOTDIR)/bin/jar
189 BOOT_JARSIGNER_CMD = $(BOOTDIR)/bin/jarsigner
190
191 # Various tools we need to run (FIXUP: Are these the right ones?)
192 NATIVE2ASCII = $(BOOTDIR)/bin/native2ascii $(JAVA_TOOLS_FLAGS:%=-J%)
193 RMIC = $(BOOTDIR)/bin/rmic $(JAVA_TOOLS_FLAGS:%=-J%)
194 IDLJ = $(BOOTDIR)/bin/idlj $(JAVA_TOOLS_FLAGS:%=-J%)
195
196 # Should not be used
197 JAVA = /should/not/be/used
198
|
38 # Suspect this may not be needed anymore.
39 JAVA_MEM_FLAGS += -Xms$(MAX_VM_MEMORY)m -XX:-Inline
40 else
41 JAVA_MEM_FLAGS += -Xms$(MIN_VM_MEMORY)m -XX:PermSize=32m -XX:MaxPermSize=160m
42 endif
43
44 #
45 # All java tools (javac, javah, and javadoc) run faster with certain java
46 # options, this macro should be used with all these tools.
47 # In particular, the client VM makes these tools run faster when
48 # it's available.
49 #
50 ADD_CLIENT_VM_OPTION = false
51 ifeq ($(PLATFORM), solaris)
52 ADD_CLIENT_VM_OPTION = true
53 else
54 ifeq ($(ARCH_DATA_MODEL), 32)
55 ADD_CLIENT_VM_OPTION = true
56 endif
57 endif
58
59 # Options for hotspot to turn off printing of options with fastdebug version
60 # and creating the hotspot.log file.
61 JAVA_HOTSPOT_DISABLE_PRINT_VMOPTIONS = \
62 -XX:-PrintVMOptions -XX:+UnlockDiagnosticVMOptions -XX:-LogVMOutput
63
64 # JVM options
65 JAVA_JVM_FLAGS = $(JAVA_HOTSPOT_DISABLE_PRINT_VMOPTIONS)
66
67 ifeq ($(ADD_CLIENT_VM_OPTION), true)
68 JAVA_JVM_FLAGS += -client
69 endif
70 ifdef USE_HOTSPOT_INTERPRETER_MODE
71 JAVA_JVM_FLAGS += -Xint
72 endif
73
74 # Various VM flags
75 JAVA_TOOLS_FLAGS = $(JAVA_JVM_FLAGS) $(JAVA_MEM_FLAGS)
76
77 # The VM flags for javac
78 JAVAC_JVM_FLAGS =
79
80 # 64-bit builds require a larger thread stack size.
81 ifeq ($(ARCH_DATA_MODEL), 32)
82 JAVAC_JVM_FLAGS += -J-XX:ThreadStackSize=768
83 else
84 JAVAC_JVM_FLAGS += -J-XX:ThreadStackSize=1536
85 endif
86 JAVAC_JVM_FLAGS += $(JAVA_TOOLS_FLAGS:%=-J%)
87
88 # The jar -J options are special, must be added at the end of the command line
89 JAR_JFLAGS = $(JAVA_TOOLS_FLAGS:%=-J%)
90
91 # JAVA_TOOLS_DIR is the default location to find Java tools to run, if
92 # langtools is not available.
94 ifndef JAVA_TOOLS_DIR
95 JAVA_TOOLS_DIR = $(JDK_IMPORT_PATH)/bin
96 endif
97
98 #
99 # Invoking the Java compiler. In leaf makefiles, choose as follows:
100 # -- Use JAVAC if you want to take full control of what options get
101 # passed to javac.
102 # -- Use JAVAC_CMD if you want to take the defaults given to you.
103 #
104
105 ifndef DEBUG_CLASSFILES
106 ifeq ($(VARIANT), DBG)
107 DEBUG_CLASSFILES = true
108 endif
109 endif
110 JAVACFLAGS =
111 ifeq ($(DEBUG_CLASSFILES),true)
112 JAVACFLAGS += -g
113 endif
114 ifeq ($(JAVAC_MAX_WARNINGS), true)
115 JAVACFLAGS += -Xlint:all
116 endif
117 ifeq ($(JAVAC_WARNINGS_FATAL), true)
118 JAVACFLAGS += -Werror
119 endif
120
121 NO_PROPRIETARY_API_WARNINGS = -XDignore.symbol.file=true
122 JAVACFLAGS += $(NO_PROPRIETARY_API_WARNINGS)
123
124 # Add the source level
125 SOURCE_LANGUAGE_VERSION = 7
126 LANGUAGE_VERSION = -source $(SOURCE_LANGUAGE_VERSION)
127 JAVACFLAGS += $(LANGUAGE_VERSION)
128
129 # Add the class version we want
130 TARGET_CLASS_VERSION = 7
131 CLASS_VERSION = -target $(TARGET_CLASS_VERSION)
132 JAVACFLAGS += $(CLASS_VERSION)
133 JAVACFLAGS += -encoding ascii
134 JAVACFLAGS += -classpath $(BOOTDIR)/lib/tools.jar
135 JAVACFLAGS += $(OTHER_JAVACFLAGS)
136
137 # Needed for javah
138 JAVAHFLAGS += -classpath $(CLASSBINDIR)
139
140 # Langtools
141 ifdef LANGTOOLS_DIST
142 JAVAC_JAR = $(LANGTOOLS_DIST)/bootstrap/lib/javac.jar
143 JAVAH_JAR = $(LANGTOOLS_DIST)/bootstrap/lib/javah.jar
144 JAVADOC_JAR = $(LANGTOOLS_DIST)/bootstrap/lib/javadoc.jar
145 DOCLETS_JAR = $(LANGTOOLS_DIST)/bootstrap/lib/doclets.jar
146 JAVAC_CMD = $(BOOT_JAVA_CMD) \
174 #
175 # The javac supplied with the LANGTOOLS_DIST should be used to build the
176 # classes that will be put into the built jdk. But note that this javac
177 # will use the ALT_BOOTDIR java runtime. Any classes created by the
178 # LANGTOOLS_DIST javac should not be run during this jdk build and indeed
179 # may not even run with the ALT_BOOTDIR jdk because they may be a newer
180 # class file version that the ALT_BOOTDIR jdk doesn't understand.
181 #
182 # The important observation here is that the built jdk is NOT run during
183 # the build. If the built jdk needs to be verified that it can build this
184 # same jdk, then it should be supplied to the build process as the ALT_BOOTDIR
185 # jdk, and this resulting built jdk should be compared to the first one.
186 # (They should be the same). Re-using this built jdk as the ALT_BOOTDIR
187 # jdk will be the only way and the recommeneded way to verify the built jdk
188 # can bootstrap itself.
189 #
190
191 # The javac options supplied to the boot javac is limited. This compiler
192 # should only be used to build the 'make/tools' sources, which are not
193 # class files that end up in the classes directory.
194 ifeq ($(JAVAC_MAX_WARNINGS), true)
195 BOOT_JAVACFLAGS += -Xlint:all
196 endif
197 ifeq ($(JAVAC_WARNINGS_FATAL), true)
198 BOOT_JAVACFLAGS += -Werror
199 endif
200
201 BOOT_SOURCE_LANGUAGE_VERSION = 6
202 BOOT_TARGET_CLASS_VERSION = 6
203 BOOT_JAVACFLAGS += -encoding ascii -source $(BOOT_SOURCE_LANGUAGE_VERSION) -target $(BOOT_TARGET_CLASS_VERSION)
204 BOOT_JAR_JFLAGS += $(JAR_JFLAGS)
205
206 BOOT_JAVA_CMD = $(BOOTDIR)/bin/java $(JAVA_TOOLS_FLAGS)
207 BOOT_JAVAC_CMD = $(BOOTDIR)/bin/javac $(JAVAC_JVM_FLAGS) $(BOOT_JAVACFLAGS)
208 BOOT_JAR_CMD = $(BOOTDIR)/bin/jar
209 BOOT_JARSIGNER_CMD = $(BOOTDIR)/bin/jarsigner
210
211 # Various tools we need to run (FIXUP: Are these the right ones?)
212 NATIVE2ASCII = $(BOOTDIR)/bin/native2ascii $(JAVA_TOOLS_FLAGS:%=-J%)
213 RMIC = $(BOOTDIR)/bin/rmic $(JAVA_TOOLS_FLAGS:%=-J%)
214 IDLJ = $(BOOTDIR)/bin/idlj $(JAVA_TOOLS_FLAGS:%=-J%)
215
216 # Should not be used
217 JAVA = /should/not/be/used
218
|