Mercurial > hg > truffle
comparison mxtool/mx.py @ 18484:e97e1f07a3d6
mx build: set initial heap size explicitly
author | Bernhard Urban <bernhard.urban@jku.at> |
---|---|
date | Fri, 21 Nov 2014 13:16:02 +0100 |
parents | a4ab0b87fb34 |
children | 676f1800077c |
comparison
equal
deleted
inserted
replaced
18483:d7cc487d1325 | 18484:e97e1f07a3d6 |
---|---|
2373 if not self.jdtJar: | 2373 if not self.jdtJar: |
2374 mainJava = java() | 2374 mainJava = java() |
2375 if not args.error_prone: | 2375 if not args.error_prone: |
2376 javac = args.alt_javac if args.alt_javac else mainJava.javac | 2376 javac = args.alt_javac if args.alt_javac else mainJava.javac |
2377 self.logCompilation('javac' if not args.alt_javac else args.alt_javac) | 2377 self.logCompilation('javac' if not args.alt_javac else args.alt_javac) |
2378 javacCmd = [javac, '-g', '-J-Xmx1g', '-source', compliance, '-target', compliance, '-classpath', cp, '-d', outputDir, '-bootclasspath', jdk.bootclasspath(), '-endorseddirs', jdk.endorseddirs(), '-extdirs', jdk.extdirs()] | 2378 javacCmd = [javac, '-g', '-J-Xmx1g', '-J-Xms1g', '-source', compliance, '-target', compliance, '-classpath', cp, '-d', outputDir, '-bootclasspath', jdk.bootclasspath(), '-endorseddirs', jdk.endorseddirs(), '-extdirs', jdk.extdirs()] |
2379 if jdk.debug_port is not None: | 2379 if jdk.debug_port is not None: |
2380 javacCmd += ['-J-Xdebug', '-J-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=' + str(jdk.debug_port)] | 2380 javacCmd += ['-J-Xdebug', '-J-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=' + str(jdk.debug_port)] |
2381 javacCmd += processorArgs | 2381 javacCmd += processorArgs |
2382 javacCmd += ['@' + _cygpathU2W(argfile.name)] | 2382 javacCmd += ['@' + _cygpathU2W(argfile.name)] |
2383 | 2383 |
2384 if not args.warnAPI: | 2384 if not args.warnAPI: |
2385 javacCmd.append('-XDignore.symbol.file') | 2385 javacCmd.append('-XDignore.symbol.file') |
2386 run(javacCmd) | 2386 run(javacCmd) |
2387 else: | 2387 else: |
2388 self.logCompilation('javac (with error-prone)') | 2388 self.logCompilation('javac (with error-prone)') |
2389 javaArgs = ['-Xmx1g'] | 2389 javaArgs = ['-Xmx1g', '-Xms1g'] |
2390 javacArgs = ['-g', '-source', compliance, '-target', compliance, '-classpath', cp, '-d', outputDir, '-bootclasspath', jdk.bootclasspath(), '-endorseddirs', jdk.endorseddirs(), '-extdirs', jdk.extdirs()] | 2390 javacArgs = ['-g', '-source', compliance, '-target', compliance, '-classpath', cp, '-d', outputDir, '-bootclasspath', jdk.bootclasspath(), '-endorseddirs', jdk.endorseddirs(), '-extdirs', jdk.extdirs()] |
2391 javacArgs += processorArgs | 2391 javacArgs += processorArgs |
2392 javacArgs += ['@' + argfile.name] | 2392 javacArgs += ['@' + argfile.name] |
2393 if not args.warnAPI: | 2393 if not args.warnAPI: |
2394 javacArgs.append('-XDignore.symbol.file') | 2394 javacArgs.append('-XDignore.symbol.file') |
2395 run_java(javaArgs + ['-cp', os.pathsep.join([mainJava.toolsjar, args.error_prone]), 'com.google.errorprone.ErrorProneCompiler'] + javacArgs) | 2395 run_java(javaArgs + ['-cp', os.pathsep.join([mainJava.toolsjar, args.error_prone]), 'com.google.errorprone.ErrorProneCompiler'] + javacArgs) |
2396 else: | 2396 else: |
2397 self.logCompilation('JDT') | 2397 self.logCompilation('JDT') |
2398 | 2398 |
2399 jdtVmArgs = ['-Xmx1g', '-jar', _cygpathU2W(self.jdtJar)] | 2399 jdtVmArgs = ['-Xmx1g', '-Xms1g', '-jar', _cygpathU2W(self.jdtJar)] |
2400 | 2400 |
2401 jdtArgs = ['-' + compliance, | 2401 jdtArgs = ['-' + compliance, |
2402 '-cp', cp, '-g', '-enableJavadoc', | 2402 '-cp', cp, '-g', '-enableJavadoc', |
2403 '-d', outputDir, | 2403 '-d', outputDir, |
2404 '-bootclasspath', jdk.bootclasspath(), | 2404 '-bootclasspath', jdk.bootclasspath(), |
3194 log('Running Checkstyle on {0} using {1}...'.format(sourceDir, config)) | 3194 log('Running Checkstyle on {0} using {1}...'.format(sourceDir, config)) |
3195 | 3195 |
3196 try: | 3196 try: |
3197 for chunk in _chunk_files_for_command_line(javafilelist): | 3197 for chunk in _chunk_files_for_command_line(javafilelist): |
3198 try: | 3198 try: |
3199 run_java(['-Xmx1g', '-jar', library('CHECKSTYLE').get_path(True), '-f', 'xml', '-c', config, '-o', auditfileName] + chunk, nonZeroIsFatal=False) | 3199 run_java(['-Xmx1g', '-Xms1g', '-jar', library('CHECKSTYLE').get_path(True), '-f', 'xml', '-c', config, '-o', auditfileName] + chunk, nonZeroIsFatal=False) |
3200 finally: | 3200 finally: |
3201 if exists(auditfileName): | 3201 if exists(auditfileName): |
3202 errors = [] | 3202 errors = [] |
3203 source = [None] | 3203 source = [None] |
3204 def start_element(name, attrs): | 3204 def start_element(name, attrs): |