Mercurial > hg > truffle
comparison mx/commands.py @ 4572:76841bdd5f3e
(Windows) Add Graal build configurations (with GRAAL defined) and fix build command.
author | Andreas Woess <andreas.woess@jku.at> |
---|---|
date | Sat, 11 Feb 2012 23:35:44 +0100 |
parents | 723df37192d6 |
children | ccb5369481a2 |
comparison
equal
deleted
inserted
replaced
4571:ac6e494d048a | 4572:76841bdd5f3e |
---|---|
365 else: | 365 else: |
366 assert vm == 'graal', vm | 366 assert vm == 'graal', vm |
367 buildSuffix = 'graal' | 367 buildSuffix = 'graal' |
368 | 368 |
369 for build in builds: | 369 for build in builds: |
370 | |
371 jdk = _jdk(build, True) | 370 jdk = _jdk(build, True) |
372 if build == 'debug': | |
373 build = 'jvmg' | |
374 | 371 |
375 vmDir = join(jdk, 'jre', 'lib', 'amd64', vm) | 372 vmDir = join(jdk, 'jre', 'lib', 'amd64', vm) |
376 if not exists(vmDir): | 373 if not exists(vmDir): |
377 mx.log('Creating VM directory in JDK7: ' + vmDir) | 374 mx.log('Creating VM directory in JDK7: ' + vmDir) |
378 os.makedirs(vmDir) | 375 os.makedirs(vmDir) |
383 | 380 |
384 if platform.system() == 'Windows': | 381 if platform.system() == 'Windows': |
385 compilelogfile = _graal_home + '/graalCompile.log' | 382 compilelogfile = _graal_home + '/graalCompile.log' |
386 mksHome = mx.get_env('MKS_HOME', 'C:\\cygwin\\bin') | 383 mksHome = mx.get_env('MKS_HOME', 'C:\\cygwin\\bin') |
387 | 384 |
388 _runInDebugShell('msbuild ' + _graal_home + r'\build\vs-amd64\jvm.vcproj /p:Configuration=compiler1_product /target:clean', _graal_home) | 385 variant = {'client': 'compiler1', 'server': 'compiler2'}.get(vm, vm) |
389 winCompileCmd = r'set HotSpotMksHome=' + mksHome + r'& set OUT_DIR=' + jdk + r'& set JAVA_HOME=' + jdk + r'& set path=%JAVA_HOME%\bin;%path%;%HotSpotMksHome%& cd /D "' +_graal_home + r'\make\windows"& call create.bat ' + _graal_home + '' | 386 project_config = variant + '_' + build |
387 _runInDebugShell('msbuild ' + _graal_home + r'\build\vs-amd64\jvm.vcproj /p:Configuration=' + project_config + ' /target:clean', _graal_home) | |
388 winCompileCmd = r'set HotSpotMksHome=' + mksHome + r'& set OUT_DIR=' + jdk + r'& set JAVA_HOME=' + jdk + r'& set path=%JAVA_HOME%\bin;%path%;%HotSpotMksHome%& cd /D "' +_graal_home + r'\make\windows"& call create.bat ' + _graal_home | |
390 print(winCompileCmd) | 389 print(winCompileCmd) |
391 winCompileSuccess = re.compile(r"^Writing \.vcxproj file:") | 390 winCompileSuccess = re.compile(r"^Writing \.vcxproj file:") |
392 if not _runInDebugShell(winCompileCmd, _graal_home, compilelogfile, winCompileSuccess): | 391 if not _runInDebugShell(winCompileCmd, _graal_home, compilelogfile, winCompileSuccess): |
393 mx.log('Error executing create command') | 392 mx.log('Error executing create command') |
394 return | 393 return |
395 winBuildCmd = 'msbuild ' + _graal_home + r'\build\vs-amd64\jvm.vcxproj /p:Configuration=compiler1_product /p:Platform=x64' | 394 winBuildCmd = 'msbuild ' + _graal_home + r'\build\vs-amd64\jvm.vcxproj /p:Configuration=' + project_config + ' /p:Platform=x64' |
396 winBuildSuccess = re.compile('Build succeeded.') | 395 winBuildSuccess = re.compile('Build succeeded.') |
397 if not _runInDebugShell(winBuildCmd, _graal_home, compilelogfile, winBuildSuccess): | 396 if not _runInDebugShell(winBuildCmd, _graal_home, compilelogfile, winBuildSuccess): |
398 mx.log('Error building project') | 397 mx.log('Error building project') |
399 return | 398 return |
400 else: | 399 else: |
400 if build == 'debug': | |
401 build = 'jvmg' | |
401 env = os.environ | 402 env = os.environ |
402 env.setdefault('ARCH_DATA_MODEL', '64') | 403 env.setdefault('ARCH_DATA_MODEL', '64') |
403 env.setdefault('LANG', 'C') | 404 env.setdefault('LANG', 'C') |
404 env.setdefault('HOTSPOT_BUILD_JOBS', '3') | 405 env.setdefault('HOTSPOT_BUILD_JOBS', '3') |
405 env['ALT_BOOTDIR'] = jdk | 406 env['ALT_BOOTDIR'] = jdk |