comparison mx/mx_graal.py @ 13928:c4e5a685c6a1

gate: compile java with ECJ if available
author Bernhard Urban <bernhard.urban@jku.at>
date Tue, 11 Feb 2014 22:41:50 +0100
parents 9d70445ea369
children ca0e1af320f6
comparison
equal deleted inserted replaced
13927:91699ee4e4fa 13928:c4e5a685c6a1
1069 1069
1070 t = Task('Pylint') 1070 t = Task('Pylint')
1071 mx.pylint([]) 1071 mx.pylint([])
1072 tasks.append(t.stop()) 1072 tasks.append(t.stop())
1073 1073
1074 t = Task('Clean') 1074 def _clean(name='Clean'):
1075 cleanArgs = [] 1075 t = Task(name)
1076 if not args.cleanNative: 1076 cleanArgs = []
1077 cleanArgs.append('--no-native') 1077 if not args.cleanNative:
1078 if not args.cleanJava: 1078 cleanArgs.append('--no-native')
1079 cleanArgs.append('--no-java') 1079 if not args.cleanJava:
1080 clean(cleanArgs) 1080 cleanArgs.append('--no-java')
1081 tasks.append(t.stop()) 1081 clean(cleanArgs)
1082 tasks.append(t.stop())
1083 _clean()
1082 1084
1083 t = Task('IDEConfigCheck') 1085 t = Task('IDEConfigCheck')
1084 mx.ideclean([]) 1086 mx.ideclean([])
1085 mx.ideinit([]) 1087 mx.ideinit([])
1086 tasks.append(t.stop()) 1088 tasks.append(t.stop())
1087 1089
1088 eclipse_exe = os.environ.get('ECLIPSE_EXE') 1090 eclipse_exe = mx.get_env('ECLIPSE_EXE')
1089 if eclipse_exe is not None: 1091 if eclipse_exe is not None:
1090 t = Task('CodeFormatCheck') 1092 t = Task('CodeFormatCheck')
1091 if mx.eclipseformat(['-e', eclipse_exe]) != 0: 1093 if mx.eclipseformat(['-e', eclipse_exe]) != 0:
1092 t.abort('Formatter modified files - run "mx eclipseformat", check in changes and repush') 1094 t.abort('Formatter modified files - run "mx eclipseformat", check in changes and repush')
1093 tasks.append(t.stop()) 1095 tasks.append(t.stop())
1096 mx.log(time.strftime('%d %b %Y %H:%M:%S - Ensuring mx/projects files are canonicalized...')) 1098 mx.log(time.strftime('%d %b %Y %H:%M:%S - Ensuring mx/projects files are canonicalized...'))
1097 if mx.canonicalizeprojects([]) != 0: 1099 if mx.canonicalizeprojects([]) != 0:
1098 t.abort('Rerun "mx canonicalizeprojects" and check-in the modified mx/projects files.') 1100 t.abort('Rerun "mx canonicalizeprojects" and check-in the modified mx/projects files.')
1099 tasks.append(t.stop()) 1101 tasks.append(t.stop())
1100 1102
1101 t = Task('BuildJava') 1103 if mx.get_env('JDT'):
1102 build(['--no-native', '--jdt-warning-as-error']) 1104 t = Task('BuildJavaWithEcj')
1105 build(['--no-native', '--jdt-warning-as-error'])
1106 tasks.append(t.stop())
1107
1108 _clean('CleanAfterEcjBuild')
1109
1110 t = Task('BuildJavaWithJavac')
1111 build(['--no-native', '--force-javac'])
1103 tasks.append(t.stop()) 1112 tasks.append(t.stop())
1104 1113
1105 t = Task('Checkstyle') 1114 t = Task('Checkstyle')
1106 if mx.checkstyle([]) != 0: 1115 if mx.checkstyle([]) != 0:
1107 t.abort('Checkstyle warnings were found') 1116 t.abort('Checkstyle warnings were found')