Mercurial > hg > graal-jvmci-8
comparison mx.jvmci/mx_jvmci.py @ 22143:616739e61fb6
changed JDKDeployedDist.postJdkInstall to be an overridable method
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Wed, 08 Jul 2015 15:11:28 +0200 |
parents | 8704244e4f6a |
children | 2d03fccbbfa9 |
comparison
equal
deleted
inserted
replaced
22142:8704244e4f6a | 22143:616739e61fb6 |
---|---|
87 self.name = name | 87 self.name = name |
88 self.isExtension = isExtension | 88 self.isExtension = isExtension |
89 self.usesJVMCIClassLoader = usesJVMCIClassLoader | 89 self.usesJVMCIClassLoader = usesJVMCIClassLoader |
90 self.partOfHotSpot = partOfHotSpot # true when this distribution is delivered with HotSpot | 90 self.partOfHotSpot = partOfHotSpot # true when this distribution is delivered with HotSpot |
91 | 91 |
92 # A hook called after the jar(s) for this dist have been deployed into a JDK. If not None, | 92 def onPostJdkInstall(self, jdkDir, targetDir): |
93 # this hook is called with these arguments: | 93 ''' |
94 # jdkDir: the root directory of the JDK | 94 Called after the jar(s) for this dist have been deployed to 'targetDir' which |
95 # targetDir: the directory into which the jar(s) were installed | 95 is in the JDK at 'jdkDir'. |
96 self.postJdkInstall = None | 96 ''' |
97 pass | |
98 | |
99 def dist(self): | |
100 return mx.distribution(self.name) | |
97 | 101 |
98 """ | 102 """ |
99 List of distributions that are deployed into a JDK by mx. | 103 List of distributions that are deployed into a JDK by mx. |
100 """ | 104 """ |
101 jdkDeployedDists = [ | 105 jdkDeployedDists = [ |
608 if dist.sourcesPath: | 612 if dist.sourcesPath: |
609 copyToJdk(dist.sourcesPath, jdkDir) | 613 copyToJdk(dist.sourcesPath, jdkDir) |
610 if deployableDist.usesJVMCIClassLoader: | 614 if deployableDist.usesJVMCIClassLoader: |
611 # deploy service files | 615 # deploy service files |
612 _updateJVMCIFiles(jdkDir) | 616 _updateJVMCIFiles(jdkDir) |
613 if deployableDist.postJdkInstall: | 617 deployableDist.onPostJdkInstall(jdkDir, targetDir) |
614 deployableDist.postJdkInstall(jdkDir, targetDir) | |
615 | 618 |
616 def _check_for_obsolete_jvmci_files(): | 619 def _check_for_obsolete_jvmci_files(): |
617 jdks = _jdksDir() | 620 jdks = _jdksDir() |
618 if exists(jdks): | 621 if exists(jdks): |
619 for e in os.listdir(jdks): | 622 for e in os.listdir(jdks): |
761 | 764 |
762 if not opts2.native: | 765 if not opts2.native: |
763 return | 766 return |
764 | 767 |
765 if opts2.java and not opts2.projects and not opts2.only: | 768 if opts2.java and not opts2.projects and not opts2.only: |
766 # Only check deployed JVMCI files on a full build | 769 # Only check deployed JVMCI files on a full build |
767 _check_for_obsolete_jvmci_files() | 770 _check_for_obsolete_jvmci_files() |
768 | 771 |
769 builds = [_vmbuild] | 772 builds = [_vmbuild] |
770 | 773 |
771 if os.environ.get('BUILDING_FROM_IDE', None) == 'true': | 774 if os.environ.get('BUILDING_FROM_IDE', None) == 'true': |