Search in sources :

Example 1 with UMA

use of com.ibm.uma.UMA in project openj9 by eclipse.

the class PlatformWindows method writeTweakedPhaseTargets.

/**
 * Write phase targets that
 * @param buffer
 */
private void writeTweakedPhaseTargets(StringBuffer buffer) {
    UMA uma = UMA.getUma();
    IConfiguration config = uma.getConfiguration();
    buffer.append("\n");
    buffer.append("export UMA_SINGLE_REBASE\n\n");
    for (int i = 0; i < config.numberOfPhases(); i++) {
        String phaseName = config.phaseName(i);
        buffer.append("phase_" + phaseName + ": UMA_SINGLE_REBASE=1\n");
        buffer.append("phase_" + phaseName + ": rebase\n");
        buffer.append("\n");
    }
    buffer.append("\n\n");
    buffer.append("all: UMA_SINGLE_REBASE=1\n");
    buffer.append("all: rebase\n");
    buffer.append("\n\n");
}
Also used : UMA(com.ibm.uma.UMA) IConfiguration(com.ibm.uma.IConfiguration)

Example 2 with UMA

use of com.ibm.uma.UMA 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);
    }
}
Also used : UMA(com.ibm.uma.UMA) UMAException(com.ibm.uma.UMAException) File(java.io.File) ConfigurationImpl(com.ibm.j9.uma.configuration.ConfigurationImpl) Flag(com.ibm.j9tools.om.Flag)

Aggregations

UMA (com.ibm.uma.UMA)2 ConfigurationImpl (com.ibm.j9.uma.configuration.ConfigurationImpl)1 Flag (com.ibm.j9tools.om.Flag)1 IConfiguration (com.ibm.uma.IConfiguration)1 UMAException (com.ibm.uma.UMAException)1 File (java.io.File)1