Mercurial > hg > graal-jvmci-8
comparison mxtool/mx.py @ 14917:3e06a56ab0e6
When building with JDT, use the one from JAVA_HOME but set the booclasspath, extdirs and endorseddirs to the correct JDK for cross-compilation.
author | Gilles Duboscq <duboscq@ssw.jku.at> |
---|---|
date | Tue, 01 Apr 2014 15:50:55 +0200 |
parents | 66e9855f4ae8 |
children | 31a9c79399c8 |
comparison
equal
deleted
inserted
replaced
14916:66e9855f4ae8 | 14917:3e06a56ab0e6 |
---|---|
1888 javacArgs.append('-XDignore.symbol.file') | 1888 javacArgs.append('-XDignore.symbol.file') |
1889 run_java(javaArgs + ['-cp', os.pathsep.join([mainJava.toolsjar, args.error_prone]), 'com.google.errorprone.ErrorProneCompiler'] + javacArgs) | 1889 run_java(javaArgs + ['-cp', os.pathsep.join([mainJava.toolsjar, args.error_prone]), 'com.google.errorprone.ErrorProneCompiler'] + javacArgs) |
1890 else: | 1890 else: |
1891 log('Compiling Java sources for {0} with JDT...'.format(p.name)) | 1891 log('Compiling Java sources for {0} with JDT...'.format(p.name)) |
1892 | 1892 |
1893 jdtArgs = [jdk.java, '-Xmx1g'] | 1893 jdtVmArgs = ['-Xmx1g', '-jar', jdtJar] |
1894 if jdk.debug_port is not None: | 1894 |
1895 jdtArgs += ['-Xdebug', '-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=' + str(jdk.debug_port)] | 1895 jdtArgs = ['-' + compliance, |
1896 | |
1897 jdtArgs += ['-jar', jdtJar, | |
1898 '-' + compliance, | |
1899 '-cp', cp, '-g', '-enableJavadoc', | 1896 '-cp', cp, '-g', '-enableJavadoc', |
1900 '-d', outputDir] | 1897 '-d', outputDir, |
1898 '-bootclasspath', jdk.bootclasspath(), | |
1899 '-endorseddirs', jdk.endorseddirs(), | |
1900 '-extdirs', jdk.extdirs()] | |
1901 jdtArgs += processorArgs | 1901 jdtArgs += processorArgs |
1902 | 1902 |
1903 | 1903 |
1904 jdtProperties = join(p.dir, '.settings', 'org.eclipse.jdt.core.prefs') | 1904 jdtProperties = join(p.dir, '.settings', 'org.eclipse.jdt.core.prefs') |
1905 rootJdtProperties = join(p.suite.mxDir, 'eclipse-settings', 'org.eclipse.jdt.core.prefs') | 1905 rootJdtProperties = join(p.suite.mxDir, 'eclipse-settings', 'org.eclipse.jdt.core.prefs') |
1920 jdtArgs += ['-properties', jdtPropertiesTmp] | 1920 jdtArgs += ['-properties', jdtPropertiesTmp] |
1921 else: | 1921 else: |
1922 jdtArgs += ['-properties', jdtProperties] | 1922 jdtArgs += ['-properties', jdtProperties] |
1923 jdtArgs.append('@' + argfile.name) | 1923 jdtArgs.append('@' + argfile.name) |
1924 | 1924 |
1925 run(jdtArgs) | 1925 run_java(jdtVmArgs + jdtArgs) |
1926 finally: | 1926 finally: |
1927 for n in toBeDeleted: | 1927 for n in toBeDeleted: |
1928 os.remove(n) | 1928 os.remove(n) |
1929 | 1929 |
1930 for dist in _dists.values(): | 1930 for dist in _dists.values(): |