use of com.ibm.j9.uma.configuration.ConfigurationImpl in project openj9 by eclipse.
the class Main method main.
public static void main(String[] args) {
if (!parseOptions(args)) {
System.out.print(applicationNameShort + " ");
for (String arg : args) {
System.out.print(" " + arg);
}
System.out.println();
dumpHelp();
System.exit(-1);
}
logger = Logger.initLogger(verbose ? Logger.InformationL2Log : Logger.InformationL1Log);
dumpSplash();
if (jitVersionFile.equals("")) {
File tempJitVersionFile = new File(rootDir + "/compiler/trj9/build/version.h");
if (tempJitVersionFile.exists() && !tempJitVersionFile.isDirectory()) {
jitVersionFile = rootDir + "/compiler/trj9/build/version.h";
System.out.print("Using version.h as the jitVersionFile\n");
} else {
tempJitVersionFile = new File(rootDir + "/jit.version");
if (tempJitVersionFile.exists() && !tempJitVersionFile.isDirectory()) {
jitVersionFile = rootDir + "/jit.version";
System.out.print("Using jit.version as the jitVersionFile\n");
}
}
}
try {
ConfigurationImpl configuration = new ConfigurationImpl(configDirectory, buildSpecId, buildId, buildDate, buildTag, jitVersionFile, excludeArtifacts);
for (String flagString : overrideFlags.keySet()) {
if (!configuration.isFlagValid(flagString)) {
throw new UMAException("Invalid flag override: " + flagString);
}
Flag flag = configuration.getBuildSpec().getFlag(flagString);
flag.setState(overrideFlags.get(flagString));
}
// Since we may have changed some flags, we need to re-verify them
configuration.verify();
new UMA(configuration, configuration, rootDir).generate();
} catch (NullPointerException e) {
logger.println(Logger.ErrorLog, "Internal error: null pointer exception");
e.printStackTrace();
System.exit(-1);
} catch (UMAException e) {
logger.println(Logger.ErrorLog, e.getMessage());
System.exit(-1);
}
}
Aggregations