Mercurial > hg > truffle
changeset 16062:a864a411fad3
mx: added -alt-javac option to build command to support an external javac executable (or javac wrapper)
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Fri, 06 Jun 2014 16:03:56 +0200 |
parents | d8343c347dc0 |
children | 1d2c8c963d98 |
files | mxtool/mx.py |
diffstat | 1 files changed, 5 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/mxtool/mx.py Fri Jun 06 16:01:54 2014 +0200 +++ b/mxtool/mx.py Fri Jun 06 16:03:56 2014 +0200 @@ -1978,8 +1978,9 @@ if not self.jdtJar: mainJava = java() if not args.error_prone: - self.logCompilation('javac') - javacCmd = [mainJava.javac, '-g', '-J-Xmx1g', '-source', compliance, '-target', compliance, '-classpath', cp, '-d', outputDir, '-bootclasspath', jdk.bootclasspath(), '-endorseddirs', jdk.endorseddirs(), '-extdirs', jdk.extdirs()] + javac = args.alt_javac if args.alt_javac else mainJava.javac + self.logCompilation('javac' if not args.alt_javac else args.alt_javac) + javacCmd = [javac, '-g', '-J-Xmx1g', '-source', compliance, '-target', compliance, '-classpath', cp, '-d', outputDir, '-bootclasspath', jdk.bootclasspath(), '-endorseddirs', jdk.endorseddirs(), '-extdirs', jdk.extdirs()] if jdk.debug_port is not None: javacCmd += ['-J-Xdebug', '-J-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=' + str(jdk.debug_port)] javacCmd += processorArgs @@ -2063,10 +2064,11 @@ parser.add_argument('--no-native', action='store_false', dest='native', help='do not build native projects') parser.add_argument('--jdt-warning-as-error', action='store_true', help='convert all Eclipse batch compiler warnings to errors') parser.add_argument('--jdt-show-task-tags', action='store_true', help='show task tags as Eclipse batch compiler warnings') + parser.add_argument('--alt-javac', dest='alt_javac', help='path to alternative javac executable', metavar='<path>') compilerSelect = parser.add_mutually_exclusive_group() compilerSelect.add_argument('--error-prone', dest='error_prone', help='path to error-prone.jar', metavar='<path>') compilerSelect.add_argument('--jdt', help='path to ecj.jar, the Eclipse batch compiler', default=_defaultEcjPath(), metavar='<path>') - compilerSelect.add_argument('--force-javac', action='store_true', dest='javac', help='use javac despite ecj.jar is found or not') + compilerSelect.add_argument('--force-javac', action='store_true', dest='javac', help='use javac whether ecj.jar is found or not') if suppliedParser: parser.add_argument('remainder', nargs=REMAINDER, metavar='...')