# HG changeset patch # User Jaroslav Tulach # Date 1434535649 -7200 # Node ID 2a98e51646c2aeda949643d5b9a10ecd9f7daec7 # Parent f8732226922cbcb25794c6695de7f55034d26554 Graal VM should be the default one after building basic-graal. Prepending rather than appending selected DEFAULT_VM to jvm.cfg file. diff -r f8732226922c -r 2a98e51646c2 mx/mx_graal.py --- a/mx/mx_graal.py Tue Jun 16 17:52:13 2015 -0700 +++ b/mx/mx_graal.py Wed Jun 17 12:07:29 2015 +0200 @@ -1008,20 +1008,26 @@ lines.append(line) if not found: - mx.log('Appending "' + prefix + 'KNOWN" to ' + jvmCfg) + mx.log('Prepending "' + prefix + 'KNOWN" to ' + jvmCfg) if mx.get_os() != 'windows': os.chmod(jvmCfg, JDK_UNIX_PERMISSIONS_FILE) with open(jvmCfg, 'w') as f: + written = False for line in lines: + if line.startswith('#'): + f.write(line) + continue + if not written: + f.write(vmKnown) + if vm == 'jvmci': + # Legacy support + f.write('-graal ALIASED_TO -jvmci\n') + written = True if line.startswith(prefix): line = vmKnown - found = True + if written: + continue f.write(line) - if not found: - f.write(vmKnown) - if vm == 'jvmci': - # Legacy support - f.write('-graal ALIASED_TO -jvmci\n') for jdkDist in _jdkDeployedDists: # Install non HotSpot distribution if not jdkDist.partOfHotSpot: