Mercurial > hg > truffle
comparison mxtool/mx.py @ 13247:e709633d87c6
Use java compilance from project in eclipse settings for compilance, source and target
Use java compilance for the target when building with javac
Use java compilance for the JRE_CONTAINER in eclipse .classpath
author | Gilles Duboscq <duboscq@ssw.jku.at> |
---|---|
date | Wed, 04 Dec 2013 14:58:13 +0100 |
parents | 68529068f08e |
children | 78ed696884b3 |
comparison
equal
deleted
inserted
replaced
13246:0909754d87f4 | 13247:e709633d87c6 |
---|---|
2009 compliance = str(p.javaCompliance) if p.javaCompliance is not None else args.compliance | 2009 compliance = str(p.javaCompliance) if p.javaCompliance is not None else args.compliance |
2010 if jdtJar is None: | 2010 if jdtJar is None: |
2011 log('Compiling Java sources for {0} with javac...'.format(p.name)) | 2011 log('Compiling Java sources for {0} with javac...'.format(p.name)) |
2012 | 2012 |
2013 | 2013 |
2014 javacCmd = [java().javac, '-g', '-J-Xmx1g', '-source', compliance, '-classpath', cp, '-d', outputDir] | 2014 javacCmd = [java().javac, '-g', '-J-Xmx1g', '-source', compliance, '-target', compliance, '-classpath', cp, '-d', outputDir] |
2015 if java().debug_port is not None: | 2015 if java().debug_port is not None: |
2016 javacCmd += ['-J-Xdebug', '-J-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=' + str(java().debug_port)] | 2016 javacCmd += ['-J-Xdebug', '-J-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=' + str(java().debug_port)] |
2017 javacCmd += processorArgs | 2017 javacCmd += processorArgs |
2018 javacCmd += ['@' + argfile.name] | 2018 javacCmd += ['@' + argfile.name] |
2019 | 2019 |
2889 if not exists(genDir): | 2889 if not exists(genDir): |
2890 os.mkdir(genDir) | 2890 os.mkdir(genDir) |
2891 out.element('classpathentry', {'kind' : 'src', 'path' : 'src_gen'}) | 2891 out.element('classpathentry', {'kind' : 'src', 'path' : 'src_gen'}) |
2892 | 2892 |
2893 # Every Java program depends on the JRE | 2893 # Every Java program depends on the JRE |
2894 out.element('classpathentry', {'kind' : 'con', 'path' : 'org.eclipse.jdt.launching.JRE_CONTAINER'}) | 2894 out.element('classpathentry', {'kind' : 'con', 'path' : 'org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-' + str(p.javaCompliance)}) |
2895 | 2895 |
2896 if exists(join(p.dir, 'plugin.xml')): # eclipse plugin project | 2896 if exists(join(p.dir, 'plugin.xml')): # eclipse plugin project |
2897 out.element('classpathentry', {'kind' : 'con', 'path' : 'org.eclipse.pde.core.requiredPlugins'}) | 2897 out.element('classpathentry', {'kind' : 'con', 'path' : 'org.eclipse.pde.core.requiredPlugins'}) |
2898 | 2898 |
2899 for dep in p.all_deps([], True): | 2899 for dep in p.all_deps([], True): |