changeset 13927:91699ee4e4fa

mx: add option for forcing the usage of javac
author Bernhard Urban <bernhard.urban@jku.at>
date Tue, 11 Feb 2014 22:33:43 +0100
parents 6be4edba54ba
children c4e5a685c6a1
files mxtool/mx.py
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mxtool/mx.py	Tue Feb 11 08:47:18 2014 -0800
+++ b/mxtool/mx.py	Tue Feb 11 22:33:43 2014 +0100
@@ -1557,6 +1557,7 @@
     parser.add_argument('--only', action='store', help='comma separated projects to build, without checking their dependencies (omit to build all projects)')
     parser.add_argument('--no-java', action='store_false', dest='java', help='do not build Java projects')
     parser.add_argument('--no-native', action='store_false', dest='native', help='do not build native projects')
+    parser.add_argument('--force-javac', action='store_true', dest='javac', help='use javac despite ecj.jar is found or not')
     parser.add_argument('--jdt', help='path to ecj.jar, the Eclipse batch compiler (default: ' + defaultEcjPath + ')', default=defaultEcjPath, metavar='<path>')
     parser.add_argument('--jdt-warning-as-error', action='store_true', help='convert all Eclipse batch compiler warnings to errors')
 
@@ -1566,7 +1567,7 @@
     args = parser.parse_args(args)
 
     jdtJar = None
-    if args.jdt is not None:
+    if not args.javac and args.jdt is not None:
         if not args.jdt.endswith('.jar'):
             abort('Path for Eclipse batch compiler does not look like a jar file: ' + args.jdt)
         jdtJar = args.jdt