Mercurial > hg > truffle
comparison mxtool/mx.py @ 8447:b6b9ab1fde62
removed support for using the Eclipse batch compiler bundled with Eclipse - depending on the version, it has bugs with respect to annotation processing
To use the Eclipse batch compiler, a stand alone ecj-<version>.jar should be downloaded and copied to mx/ecj.jar.
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Fri, 22 Mar 2013 15:20:16 +0100 |
parents | 39c7142e7aef |
children | b27261747964 |
comparison
equal
deleted
inserted
replaced
8446:7ef643b72910 | 8447:b6b9ab1fde62 |
---|---|
131 | 131 |
132 Property values can use environment variables with Bash syntax (e.g. ${HOME}). | 132 Property values can use environment variables with Bash syntax (e.g. ${HOME}). |
133 """ | 133 """ |
134 | 134 |
135 import sys, os, errno, time, subprocess, shlex, types, urllib2, contextlib, StringIO, zipfile, signal, xml.sax.saxutils, tempfile | 135 import sys, os, errno, time, subprocess, shlex, types, urllib2, contextlib, StringIO, zipfile, signal, xml.sax.saxutils, tempfile |
136 import shutil, fnmatch, re, xml.dom.minidom | 136 import shutil, re, xml.dom.minidom |
137 from collections import Callable | 137 from collections import Callable |
138 from threading import Thread | 138 from threading import Thread |
139 from argparse import ArgumentParser, REMAINDER | 139 from argparse import ArgumentParser, REMAINDER |
140 from os.path import join, basename, dirname, exists, getmtime, isabs, expandvars, isdir, isfile | 140 from os.path import join, basename, dirname, exists, getmtime, isabs, expandvars, isdir, isfile |
141 | 141 |
1343 parser.add_argument('--Wapi', action='store_true', dest='warnAPI', help='show warnings about using internal APIs') | 1343 parser.add_argument('--Wapi', action='store_true', dest='warnAPI', help='show warnings about using internal APIs') |
1344 parser.add_argument('--projects', action='store', help='comma separated projects to build (omit to build all projects)') | 1344 parser.add_argument('--projects', action='store', help='comma separated projects to build (omit to build all projects)') |
1345 parser.add_argument('--only', action='store', help='comma separated projects to build, without checking their dependencies (omit to build all projects)') | 1345 parser.add_argument('--only', action='store', help='comma separated projects to build, without checking their dependencies (omit to build all projects)') |
1346 parser.add_argument('--no-java', action='store_false', dest='java', help='do not build Java projects') | 1346 parser.add_argument('--no-java', action='store_false', dest='java', help='do not build Java projects') |
1347 parser.add_argument('--no-native', action='store_false', dest='native', help='do not build native projects') | 1347 parser.add_argument('--no-native', action='store_false', dest='native', help='do not build native projects') |
1348 parser.add_argument('--jdt', help='Eclipse installation or path to ecj.jar for using the Eclipse batch compiler (default: ' + defaultEcjPath + ')', default=defaultEcjPath, metavar='<path>') | 1348 parser.add_argument('--jdt', help='path to ecj.jar, the Eclipse batch compiler (default: ' + defaultEcjPath + ')', default=defaultEcjPath, metavar='<path>') |
1349 parser.add_argument('--jdt-warning-as-error', action='store_true', help='convert all Eclipse batch compiler warnings to errors') | 1349 parser.add_argument('--jdt-warning-as-error', action='store_true', help='convert all Eclipse batch compiler warnings to errors') |
1350 | 1350 |
1351 if suppliedParser: | 1351 if suppliedParser: |
1352 parser.add_argument('remainder', nargs=REMAINDER, metavar='...') | 1352 parser.add_argument('remainder', nargs=REMAINDER, metavar='...') |
1353 | 1353 |
1358 if args.jdt.endswith('.jar'): | 1358 if args.jdt.endswith('.jar'): |
1359 jdtJar=args.jdt | 1359 jdtJar=args.jdt |
1360 if not exists(jdtJar) and os.path.abspath(jdtJar) == os.path.abspath(defaultEcjPath): | 1360 if not exists(jdtJar) and os.path.abspath(jdtJar) == os.path.abspath(defaultEcjPath): |
1361 # Silently ignore JDT if default location is used but not ecj.jar exists there | 1361 # Silently ignore JDT if default location is used but not ecj.jar exists there |
1362 jdtJar = None | 1362 jdtJar = None |
1363 elif isdir(args.jdt): | |
1364 plugins = join(args.jdt, 'plugins') | |
1365 choices = [f for f in os.listdir(plugins) if fnmatch.fnmatch(f, 'org.eclipse.jdt.core_*.jar')] | |
1366 if len(choices) != 0: | |
1367 jdtJar = join(plugins, sorted(choices, reverse=True)[0]) | |
1368 | 1363 |
1369 built = set() | 1364 built = set() |
1370 | 1365 |
1371 projects = None | 1366 projects = None |
1372 if args.projects is not None: | 1367 if args.projects is not None: |