comparison pytools/commands.py @ 3624:e81927755129

Removed targetting of JDK7G by gl.py.
author Doug Simon <doug.simon@oracle.com>
date Wed, 09 Nov 2011 17:02:12 +0100
parents 3b2ab8970aa4
children 019c1951cb04
comparison
equal deleted inserted replaced
3623:3b2ab8970aa4 3624:e81927755129
29 import os 29 import os
30 from os.path import join, exists 30 from os.path import join, exists
31 from collections import Callable 31 from collections import Callable
32 32
33 def clean(env, args): 33 def clean(env, args):
34 """cleans the Graal+HotSpot source tree""" 34 """cleans the GraalVM source tree"""
35 os.environ.update(ARCH_DATA_MODEL='64', LANG='C', HOTSPOT_BUILD_JOBS='16') 35 os.environ.update(ARCH_DATA_MODEL='64', LANG='C', HOTSPOT_BUILD_JOBS='16')
36 env.run(['gmake', 'clean'], cwd=join(env.graal_home, 'make')) 36 env.run(['gmake', 'clean'], cwd=join(env.graal_home, 'make'))
37 37
38 def bootstrap(env, args): 38 def bootstrap(env, args):
39 return env.run_vm(args + ['-version']) 39 return env.run_vm(args + ['-version'])
119 fmtArgs += [str(d)] 119 fmtArgs += [str(d)]
120 doc = doc.format(*fmtArgs) 120 doc = doc.format(*fmtArgs)
121 print 'gl {0} {1}\n\n{2}\n'.format(name, usage, doc) 121 print 'gl {0} {1}\n\n{2}\n'.format(name, usage, doc)
122 122
123 def make(env, args): 123 def make(env, args):
124 """builds the Graal+HotSpot binary""" 124 """builds the GraalVM binary"""
125 125
126 def fix_jvm_cfg(env, jdk): 126 def fix_jvm_cfg(env, jdk):
127 jvmCfg = join(jdk, 'jre', 'lib', 'amd64', 'jvm.cfg') 127 jvmCfg = join(jdk, 'jre', 'lib', 'amd64', 'jvm.cfg')
128 found = False 128 found = False
129 with open(jvmCfg) as f: 129 with open(jvmCfg) as f:
136 env.log('Appending "-graal KNOWN" to ' + jvmCfg) 136 env.log('Appending "-graal KNOWN" to ' + jvmCfg)
137 with open(jvmCfg, 'a') as f: 137 with open(jvmCfg, 'a') as f:
138 f.write('-graal KNOWN\n') 138 f.write('-graal KNOWN\n')
139 139
140 fix_jvm_cfg(env, env.jdk7) 140 fix_jvm_cfg(env, env.jdk7)
141 fix_jvm_cfg(env, env.jdk7g)
142 141
143 if env.get_os() != 'windows': 142 if env.get_os() != 'windows':
144 javaLink = join(env.graal_home, 'graal', 'hotspot', 'java') 143 javaLink = join(env.graal_home, 'graal', 'hotspot', 'java')
145 if not exists(javaLink): 144 if not exists(javaLink):
146 javaExe = join(env.jdk7, 'jre', 'bin', 'java') 145 javaExe = join(env.jdk7, 'jre', 'bin', 'java')
149 148
150 graalVmDir = join(env.jdk7, 'jre', 'lib', 'amd64', 'graal') 149 graalVmDir = join(env.jdk7, 'jre', 'lib', 'amd64', 'graal')
151 if not exists(graalVmDir): 150 if not exists(graalVmDir):
152 env.log('Creating Graal directory in JDK7: ' + graalVmDir) 151 env.log('Creating Graal directory in JDK7: ' + graalVmDir)
153 os.makedirs(graalVmDir) 152 os.makedirs(graalVmDir)
154
155 graalVmDbgDir = join(env.jdk7g, 'jre', 'lib', 'amd64', 'graal')
156 if not exists(graalVmDbgDir):
157 env.log('Creating Graal directory in JDK7G: ' + graalVmDbgDir)
158 os.makedirs(graalVmDbgDir)
159
160 153
161 os.environ.update(ARCH_DATA_MODEL='64', LANG='C', HOTSPOT_BUILD_JOBS='4', ALT_BOOTDIR=env.jdk7g, INSTALL='y') 154 os.environ.update(ARCH_DATA_MODEL='64', LANG='C', HOTSPOT_BUILD_JOBS='4', ALT_BOOTDIR=env.jdk7g, INSTALL='y')
162 env.run(['gmake', 'jvmggraal'], cwd=join(env.graal_home, 'make')) 155 env.run(['gmake', 'jvmggraal'], cwd=join(env.graal_home, 'make'))
163 156
164 os.environ.update(ARCH_DATA_MODEL='64', LANG='C', HOTSPOT_BUILD_JOBS='4', ALT_BOOTDIR=env.jdk7, INSTALL='y') 157 os.environ.update(ARCH_DATA_MODEL='64', LANG='C', HOTSPOT_BUILD_JOBS='4', ALT_BOOTDIR=env.jdk7, INSTALL='y')