Mercurial > hg > graal-jvmci-8
comparison mxtool/mx.py @ 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 | dea42a47850e |
children | 6eef506c173d |
comparison
equal
deleted
inserted
replaced
16061:d8343c347dc0 | 16062:a864a411fad3 |
---|---|
1976 | 1976 |
1977 try: | 1977 try: |
1978 if not self.jdtJar: | 1978 if not self.jdtJar: |
1979 mainJava = java() | 1979 mainJava = java() |
1980 if not args.error_prone: | 1980 if not args.error_prone: |
1981 self.logCompilation('javac') | 1981 javac = args.alt_javac if args.alt_javac else mainJava.javac |
1982 javacCmd = [mainJava.javac, '-g', '-J-Xmx1g', '-source', compliance, '-target', compliance, '-classpath', cp, '-d', outputDir, '-bootclasspath', jdk.bootclasspath(), '-endorseddirs', jdk.endorseddirs(), '-extdirs', jdk.extdirs()] | 1982 self.logCompilation('javac' if not args.alt_javac else args.alt_javac) |
1983 javacCmd = [javac, '-g', '-J-Xmx1g', '-source', compliance, '-target', compliance, '-classpath', cp, '-d', outputDir, '-bootclasspath', jdk.bootclasspath(), '-endorseddirs', jdk.endorseddirs(), '-extdirs', jdk.extdirs()] | |
1983 if jdk.debug_port is not None: | 1984 if jdk.debug_port is not None: |
1984 javacCmd += ['-J-Xdebug', '-J-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=' + str(jdk.debug_port)] | 1985 javacCmd += ['-J-Xdebug', '-J-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=' + str(jdk.debug_port)] |
1985 javacCmd += processorArgs | 1986 javacCmd += processorArgs |
1986 javacCmd += ['@' + argfile.name] | 1987 javacCmd += ['@' + argfile.name] |
1987 | 1988 |
2061 parser.add_argument('--only', action='store', help='comma separated projects to build, without checking their dependencies (omit to build all projects)') | 2062 parser.add_argument('--only', action='store', help='comma separated projects to build, without checking their dependencies (omit to build all projects)') |
2062 parser.add_argument('--no-java', action='store_false', dest='java', help='do not build Java projects') | 2063 parser.add_argument('--no-java', action='store_false', dest='java', help='do not build Java projects') |
2063 parser.add_argument('--no-native', action='store_false', dest='native', help='do not build native projects') | 2064 parser.add_argument('--no-native', action='store_false', dest='native', help='do not build native projects') |
2064 parser.add_argument('--jdt-warning-as-error', action='store_true', help='convert all Eclipse batch compiler warnings to errors') | 2065 parser.add_argument('--jdt-warning-as-error', action='store_true', help='convert all Eclipse batch compiler warnings to errors') |
2065 parser.add_argument('--jdt-show-task-tags', action='store_true', help='show task tags as Eclipse batch compiler warnings') | 2066 parser.add_argument('--jdt-show-task-tags', action='store_true', help='show task tags as Eclipse batch compiler warnings') |
2067 parser.add_argument('--alt-javac', dest='alt_javac', help='path to alternative javac executable', metavar='<path>') | |
2066 compilerSelect = parser.add_mutually_exclusive_group() | 2068 compilerSelect = parser.add_mutually_exclusive_group() |
2067 compilerSelect.add_argument('--error-prone', dest='error_prone', help='path to error-prone.jar', metavar='<path>') | 2069 compilerSelect.add_argument('--error-prone', dest='error_prone', help='path to error-prone.jar', metavar='<path>') |
2068 compilerSelect.add_argument('--jdt', help='path to ecj.jar, the Eclipse batch compiler', default=_defaultEcjPath(), metavar='<path>') | 2070 compilerSelect.add_argument('--jdt', help='path to ecj.jar, the Eclipse batch compiler', default=_defaultEcjPath(), metavar='<path>') |
2069 compilerSelect.add_argument('--force-javac', action='store_true', dest='javac', help='use javac despite ecj.jar is found or not') | 2071 compilerSelect.add_argument('--force-javac', action='store_true', dest='javac', help='use javac whether ecj.jar is found or not') |
2070 | 2072 |
2071 if suppliedParser: | 2073 if suppliedParser: |
2072 parser.add_argument('remainder', nargs=REMAINDER, metavar='...') | 2074 parser.add_argument('remainder', nargs=REMAINDER, metavar='...') |
2073 | 2075 |
2074 args = parser.parse_args(args) | 2076 args = parser.parse_args(args) |