169 cmd.append('images')
170
171 if not mx.get_opts().verbose:
172 mx.log('--------------- make execution ----------------------')
173 mx.log('Working directory: ' + _jdkSourceRoot)
174 mx.log('Command line: ' + ' '.join(cmd))
175 mx.log('-----------------------------------------------------')
176
177 mx.run(cmd, cwd=_jdkSourceRoot)
178
179 if 'images' in cmd:
180 jdkImageDir = join(jdkBuildDir, 'images', 'jdk')
181
182 # The OpenJDK build creates an empty cacerts file so copy one from
183 # the default JDK (which is assumed to be an OracleJDK)
184 srcCerts = join(mx.get_jdk(tag='default').home, 'lib', 'security', 'cacerts')
185 if not exists(srcCerts):
186 # Might be building with JDK8 which has cacerts under jre/
187 srcCerts = join(mx.get_jdk(tag='default').home, 'jre', 'lib', 'security', 'cacerts')
188 dstCerts = join(jdkImageDir, 'lib', 'security', 'cacerts')
189 shutil.copyfile(srcCerts, dstCerts)
190
191 _create_jdk_bundle(jdkBuildDir, _vm.debugLevel, jdkImageDir)
192
193 def _get_jdk_bundle_arches():
194 """
195 Gets a list of names that will be the part of a JDK bundle's file name denoting the architecture.
196 The first element in the list is the canonical name. Symlinks should be created for the
197 remaining names.
198 """
199 cpu = mx.get_arch()
200 if cpu == 'amd64':
201 return ['x64', 'x86_64', 'amd64']
202 elif cpu == 'sparcv9':
203 return ['sparcv9']
204 mx.abort('Unsupported JDK bundle arch: ' + cpu)
205
206 def _create_jdk_bundle(jdkBuildDir, debugLevel, jdkImageDir):
207 """
208 Creates a tar.gz JDK archive, an accompanying tar.gz.sha1 file with its
|
169 cmd.append('images')
170
171 if not mx.get_opts().verbose:
172 mx.log('--------------- make execution ----------------------')
173 mx.log('Working directory: ' + _jdkSourceRoot)
174 mx.log('Command line: ' + ' '.join(cmd))
175 mx.log('-----------------------------------------------------')
176
177 mx.run(cmd, cwd=_jdkSourceRoot)
178
179 if 'images' in cmd:
180 jdkImageDir = join(jdkBuildDir, 'images', 'jdk')
181
182 # The OpenJDK build creates an empty cacerts file so copy one from
183 # the default JDK (which is assumed to be an OracleJDK)
184 srcCerts = join(mx.get_jdk(tag='default').home, 'lib', 'security', 'cacerts')
185 if not exists(srcCerts):
186 # Might be building with JDK8 which has cacerts under jre/
187 srcCerts = join(mx.get_jdk(tag='default').home, 'jre', 'lib', 'security', 'cacerts')
188 dstCerts = join(jdkImageDir, 'lib', 'security', 'cacerts')
189 if srcCerts != dstCerts:
190 shutil.copyfile(srcCerts, dstCerts)
191
192 _create_jdk_bundle(jdkBuildDir, _vm.debugLevel, jdkImageDir)
193
194 def _get_jdk_bundle_arches():
195 """
196 Gets a list of names that will be the part of a JDK bundle's file name denoting the architecture.
197 The first element in the list is the canonical name. Symlinks should be created for the
198 remaining names.
199 """
200 cpu = mx.get_arch()
201 if cpu == 'amd64':
202 return ['x64', 'x86_64', 'amd64']
203 elif cpu == 'sparcv9':
204 return ['sparcv9']
205 mx.abort('Unsupported JDK bundle arch: ' + cpu)
206
207 def _create_jdk_bundle(jdkBuildDir, debugLevel, jdkImageDir):
208 """
209 Creates a tar.gz JDK archive, an accompanying tar.gz.sha1 file with its
|