Mercurial > hg > graal-compiler
comparison mx/mx_graal.py @ 21990:2a98e51646c2
Graal VM should be the default one after building basic-graal. Prepending rather than appending selected DEFAULT_VM to jvm.cfg file.
author | Jaroslav Tulach <jaroslav.tulach@oracle.com> |
---|---|
date | Wed, 17 Jun 2015 12:07:29 +0200 |
parents | 36e37644f91e |
children |
comparison
equal
deleted
inserted
replaced
21989:f8732226922c | 21990:2a98e51646c2 |
---|---|
1006 if line.strip() == vmKnown.strip(): | 1006 if line.strip() == vmKnown.strip(): |
1007 found = True | 1007 found = True |
1008 lines.append(line) | 1008 lines.append(line) |
1009 | 1009 |
1010 if not found: | 1010 if not found: |
1011 mx.log('Appending "' + prefix + 'KNOWN" to ' + jvmCfg) | 1011 mx.log('Prepending "' + prefix + 'KNOWN" to ' + jvmCfg) |
1012 if mx.get_os() != 'windows': | 1012 if mx.get_os() != 'windows': |
1013 os.chmod(jvmCfg, JDK_UNIX_PERMISSIONS_FILE) | 1013 os.chmod(jvmCfg, JDK_UNIX_PERMISSIONS_FILE) |
1014 with open(jvmCfg, 'w') as f: | 1014 with open(jvmCfg, 'w') as f: |
1015 written = False | |
1015 for line in lines: | 1016 for line in lines: |
1017 if line.startswith('#'): | |
1018 f.write(line) | |
1019 continue | |
1020 if not written: | |
1021 f.write(vmKnown) | |
1022 if vm == 'jvmci': | |
1023 # Legacy support | |
1024 f.write('-graal ALIASED_TO -jvmci\n') | |
1025 written = True | |
1016 if line.startswith(prefix): | 1026 if line.startswith(prefix): |
1017 line = vmKnown | 1027 line = vmKnown |
1018 found = True | 1028 if written: |
1029 continue | |
1019 f.write(line) | 1030 f.write(line) |
1020 if not found: | |
1021 f.write(vmKnown) | |
1022 if vm == 'jvmci': | |
1023 # Legacy support | |
1024 f.write('-graal ALIASED_TO -jvmci\n') | |
1025 | 1031 |
1026 for jdkDist in _jdkDeployedDists: # Install non HotSpot distribution | 1032 for jdkDist in _jdkDeployedDists: # Install non HotSpot distribution |
1027 if not jdkDist.partOfHotSpot: | 1033 if not jdkDist.partOfHotSpot: |
1028 _installDistInJdks(jdkDist) | 1034 _installDistInJdks(jdkDist) |
1029 if exists(timestampFile): | 1035 if exists(timestampFile): |