143 def isJVMCIEnabled(vm): |
138 def isJVMCIEnabled(vm): |
144 assert vm in _jdkJvmVariants |
139 assert vm in _jdkJvmVariants |
145 return True |
140 return True |
146 |
141 |
147 def _makehelp(): |
142 def _makehelp(): |
148 return subprocess.check_output([mx.gmake_cmd(), 'help'], cwd=_jdkSourceRoot) |
143 return subprocess.check_output([mx.gmake_cmd(), 'help'], cwd=_get_jdk_dir()) |
149 |
144 |
150 def _runmake(args): |
145 def _runmake(args): |
151 """run the JDK make process |
146 """run the JDK make process |
152 |
147 |
153 To build hotspot and import it into the JDK: "mx make hotspot import-hotspot" |
148 To build hotspot and import it into the JDK: "mx make hotspot import-hotspot" |
154 {0}""" |
149 {0}""" |
155 |
150 |
156 jdkBuildDir = _get_jdk_build_dir() |
151 jdkBuildDir = _get_jdk_build_dir() |
157 if not exists(jdkBuildDir): |
152 if not exists(jdkBuildDir): |
158 # JDK9 must be bootstrapped with a JDK8 |
153 # JDK10 must be bootstrapped with a JDK9 |
159 compliance = mx.JavaCompliance('8') |
154 compliance = mx.JavaCompliance('9') |
160 jdk8 = mx.get_jdk(compliance.exactMatch, versionDescription=compliance.value) |
155 jdk9 = mx.get_jdk(compliance.exactMatch, versionDescription=compliance.value) |
161 cmd = ['sh', 'configure', '--with-debug-level=' + _vm.debugLevel, '--with-native-debug-symbols=external', '--disable-precompiled-headers', '--with-jvm-features=graal', |
156 cmd = ['sh', 'configure', '--with-debug-level=' + _vm.debugLevel, '--with-native-debug-symbols=external', '--disable-precompiled-headers', '--with-jvm-features=graal', |
162 '--with-jvm-variants=' + _vm.jvmVariant, '--disable-warnings-as-errors', '--with-boot-jdk=' + jdk8.home, '--with-jvm-features=graal'] |
157 '--with-jvm-variants=' + _vm.jvmVariant, '--disable-warnings-as-errors', '--with-boot-jdk=' + jdk9.home, '--with-jvm-features=graal'] |
163 mx.run(cmd, cwd=_jdkSourceRoot) |
158 mx.run(cmd, cwd=_get_jdk_dir()) |
164 cmd = [mx.gmake_cmd(), 'CONF=' + _vm.debugLevel] |
159 cmd = [mx.gmake_cmd(), 'CONF=' + _vm.debugLevel] |
165 if mx.get_opts().verbose: |
160 if mx.get_opts().verbose: |
166 cmd.append('LOG=debug') |
161 cmd.append('LOG=debug') |
167 cmd.extend(args) |
162 cmd.extend(args) |
168 if mx.get_opts().use_jdk_image and 'images' not in args: |
163 if mx.get_opts().use_jdk_image and 'images' not in args: |
169 cmd.append('images') |
164 cmd.append('images') |
170 |
165 |
171 if not mx.get_opts().verbose: |
166 if not mx.get_opts().verbose: |
172 mx.log('--------------- make execution ----------------------') |
167 mx.log('--------------- make execution ----------------------') |
173 mx.log('Working directory: ' + _jdkSourceRoot) |
168 mx.log('Working directory: ' + _get_jdk_dir()) |
174 mx.log('Command line: ' + ' '.join(cmd)) |
169 mx.log('Command line: ' + ' '.join(cmd)) |
175 mx.log('-----------------------------------------------------') |
170 mx.log('-----------------------------------------------------') |
176 |
171 |
177 mx.run(cmd, cwd=_jdkSourceRoot) |
172 mx.run(cmd, cwd=_get_jdk_dir()) |
178 |
173 |
179 def _runmultimake(args): |
174 def _runmultimake(args): |
180 """run the JDK make process for one or more configurations""" |
175 """run the JDK make process for one or more configurations""" |
181 |
176 |
182 jvmVariantsDefault = ','.join(_jdkJvmVariants) |
177 jvmVariantsDefault = ','.join(_jdkJvmVariants) |