Mercurial > hg > truffle
comparison mxtool/mx.py @ 13481:d3bd7a3bbb2b
added support for JDT environment variable which forces all Java source compilation to use the Eclipse batch compiler, including compilation as part of other commands such as eclipseinit
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Thu, 26 Dec 2013 14:13:55 +0100 |
parents | 6215ff792647 |
children | fa56f5a49270 |
comparison
equal
deleted
inserted
replaced
13480:6215ff792647 | 13481:d3bd7a3bbb2b |
---|---|
1830 if not suppliedParser: | 1830 if not suppliedParser: |
1831 parser = ArgumentParser(prog='mx build') | 1831 parser = ArgumentParser(prog='mx build') |
1832 | 1832 |
1833 javaCompliance = java().javaCompliance | 1833 javaCompliance = java().javaCompliance |
1834 | 1834 |
1835 defaultEcjPath = join(_primary_suite.mxDir, 'ecj.jar') | 1835 defaultEcjPath = get_env('JDT', join(_primary_suite.mxDir, 'ecj.jar')) |
1836 | 1836 |
1837 parser = parser if parser is not None else ArgumentParser(prog='mx build') | 1837 parser = parser if parser is not None else ArgumentParser(prog='mx build') |
1838 parser.add_argument('-f', action='store_true', dest='force', help='force build (disables timestamp checking)') | 1838 parser.add_argument('-f', action='store_true', dest='force', help='force build (disables timestamp checking)') |
1839 parser.add_argument('-c', action='store_true', dest='clean', help='removes existing build output') | 1839 parser.add_argument('-c', action='store_true', dest='clean', help='removes existing build output') |
1840 parser.add_argument('--source', dest='compliance', help='Java compliance level for projects without an explicit one', default=str(javaCompliance)) | 1840 parser.add_argument('--source', dest='compliance', help='Java compliance level for projects without an explicit one', default=str(javaCompliance)) |
1853 | 1853 |
1854 jdtJar = None | 1854 jdtJar = None |
1855 if args.jdt is not None: | 1855 if args.jdt is not None: |
1856 if args.jdt.endswith('.jar'): | 1856 if args.jdt.endswith('.jar'): |
1857 jdtJar = args.jdt | 1857 jdtJar = args.jdt |
1858 if not exists(jdtJar) and os.path.abspath(jdtJar) == os.path.abspath(defaultEcjPath): | 1858 if not exists(jdtJar) and os.path.abspath(jdtJar) == os.path.abspath(defaultEcjPath) and get_env('JDT', None) is None: |
1859 # Silently ignore JDT if default location is used but not ecj.jar exists there | 1859 # Silently ignore JDT if default location is used but not ecj.jar exists there |
1860 jdtJar = None | 1860 jdtJar = None |
1861 | 1861 |
1862 built = set() | 1862 built = set() |
1863 | 1863 |