Mercurial > hg > graal-compiler
comparison mx/mx_graal.py @ 15000:cc844a4512f1
added graal.version system property that is (only) defined by Graal enabled VMs
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Mon, 07 Apr 2014 16:24:49 +0200 |
parents | c64cd1dd4bd1 |
children | a588d99d4be1 |
comparison
equal
deleted
inserted
replaced
14999:ab81149f6029 | 15000:cc844a4512f1 |
---|---|
652 env.setdefault('ARCH_DATA_MODEL', '64') | 652 env.setdefault('ARCH_DATA_MODEL', '64') |
653 env.setdefault('LANG', 'C') | 653 env.setdefault('LANG', 'C') |
654 env.setdefault('HOTSPOT_BUILD_JOBS', str(cpus)) | 654 env.setdefault('HOTSPOT_BUILD_JOBS', str(cpus)) |
655 env.setdefault('ALT_BOOTDIR', mx.java().jdk) | 655 env.setdefault('ALT_BOOTDIR', mx.java().jdk) |
656 | 656 |
657 # extract latest release tag for graal | |
658 try: | |
659 tags = [x.split(' ')[0] for x in subprocess.check_output(['hg', 'tags']).split('\n') if x.startswith("graal-")] | |
660 except: | |
661 # not a mercurial repository or hg commands are not available. | |
662 tags = None | |
663 | |
664 if tags: | |
665 # extract the most recent tag | |
666 tag = sorted(tags, key=lambda e: [int(x) for x in e[len("graal-"):].split('.')], reverse=True)[0] | |
667 env.setdefault('USER_RELEASE_SUFFIX', tag) | |
668 | |
669 if not mx._opts.verbose: | 657 if not mx._opts.verbose: |
670 runCmd.append('MAKE_VERBOSE=') | 658 runCmd.append('MAKE_VERBOSE=') |
671 env['JAVA_HOME'] = jdk | 659 env['JAVA_HOME'] = jdk |
672 if vm.endswith('nograal'): | 660 if vm.endswith('nograal'): |
673 env['INCLUDE_GRAAL'] = 'false' | 661 env['INCLUDE_GRAAL'] = 'false' |
674 env.setdefault('ALT_OUTPUTDIR', join(_graal_home, 'build-nograal', mx.get_os())) | 662 env.setdefault('ALT_OUTPUTDIR', join(_graal_home, 'build-nograal', mx.get_os())) |
675 else: | 663 else: |
664 # extract latest release tag for graal | |
665 try: | |
666 tags = [x.split(' ')[0] for x in subprocess.check_output(['hg', '-R', _graal_home, 'tags']).split('\n') if x.startswith("graal-")] | |
667 except: | |
668 # not a mercurial repository or hg commands are not available. | |
669 tags = None | |
670 | |
671 if tags: | |
672 # extract the most recent tag | |
673 tag = sorted(tags, key=lambda e: [int(x) for x in e[len("graal-"):].split('.')], reverse=True)[0] | |
674 env.setdefault('USER_RELEASE_SUFFIX', tag) | |
675 env.setdefault('GRAAL_VERSION', tag[len("graal-"):]) | |
676 else: | |
677 version = 'unknown-{}-{}'.format(platform.node(), time.strftime('%Y-%m-%d_%H-%M-%S_%Z')) | |
678 env.setdefault('USER_RELEASE_SUFFIX', 'graal-' + version) | |
679 env.setdefault('GRAAL_VERSION', version) | |
676 env['INCLUDE_GRAAL'] = 'true' | 680 env['INCLUDE_GRAAL'] = 'true' |
677 env.setdefault('INSTALL', 'y') | 681 env.setdefault('INSTALL', 'y') |
678 if mx.get_os() == 'solaris': | 682 if mx.get_os() == 'solaris': |
679 # If using sparcWorks, setup flags to avoid make complaining about CC version | 683 # If using sparcWorks, setup flags to avoid make complaining about CC version |
680 cCompilerVersion = subprocess.Popen('CC -V', stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True).stderr.readlines()[0] | 684 cCompilerVersion = subprocess.Popen('CC -V', stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True).stderr.readlines()[0] |