comparison mx/commands.py @ 9667:1ef7b26e9177

mx/commands.py: warn about arguments after '-version' when launching the vm
author Gilles Duboscq <duboscq@ssw.jku.at>
date Mon, 13 May 2013 16:09:49 +0200
parents fde5ccbab3a3
children 8e33b4ebfef1
comparison
equal deleted inserted replaced
9666:a886c764ea59 9667:1ef7b26e9177
761 if '-d64' not in args: 761 if '-d64' not in args:
762 args = ['-d64'] + args 762 args = ['-d64'] + args
763 763
764 exe = join(jdk, 'bin', mx.exe_suffix('java')) 764 exe = join(jdk, 'bin', mx.exe_suffix('java'))
765 dbg = _native_dbg.split() if _native_dbg is not None else [] 765 dbg = _native_dbg.split() if _native_dbg is not None else []
766
767 if '-version' in args:
768 ignoredArgs = args[args.index('-version')+1:]
769 if len(ignoredArgs) > 0:
770 mx.log("Warning: The following options will be ignored by the vm because they come after the '-version' argument: " + ' '.join(ignoredArgs))
771
766 return mx.run(dbg + [exe, '-' + vm] + args, nonZeroIsFatal=nonZeroIsFatal, out=out, err=err, cwd=cwd, timeout=timeout) 772 return mx.run(dbg + [exe, '-' + vm] + args, nonZeroIsFatal=nonZeroIsFatal, out=out, err=err, cwd=cwd, timeout=timeout)
767 773
768 def _find_classes_with_annotations(p, pkgRoot, annotations, includeInnerClasses=False): 774 def _find_classes_with_annotations(p, pkgRoot, annotations, includeInnerClasses=False):
769 """ 775 """
770 Scan the sources of project 'p' for Java source files containing a line starting with 'annotation' 776 Scan the sources of project 'p' for Java source files containing a line starting with 'annotation'